X-Git-Url: https://git.toastfreeware.priv.at/gregoa/bti.git/blobdiff_plain/62218d9b082bf37952ee4aecd37a6cee48943f63..49444d16c5c1a9faa75a715214e2436010daa7e6:/config.c?ds=sidebyside diff --git a/config.c b/config.c index e06f480..2b510b9 100644 --- a/config.c +++ b/config.c @@ -351,20 +351,21 @@ void bti_parse_configfile(struct session *session) * marker if it occurs at the beginning of the line, or after * whitespace */ - hashmarker = strchrnul(line, '#'); + hashmarker = strchr(line, '#'); if (line == hashmarker) line[0] = '\0'; else { - while (hashmarker[0] != '\0') { + while (hashmarker != NULL) { --hashmarker; - if (isblank(hashmarker[0])) + if (isblank(hashmarker[0])) { hashmarker[0] = '\0'; - else { + break; + } else { /* * false positive; '#' occured * within a string */ - hashmarker = strchrnul(hashmarker+2, '#'); + hashmarker = strchr(hashmarker+2, '#'); } } }