X-Git-Url: https://git.toastfreeware.priv.at/gregoa/bti.git/blobdiff_plain/dc38829e3ba8688fee7c0aff7d419ac6b01d4f7e..9c4bfd8cd15f0cfcf774313ac84513f6ba6f366d:/config.c 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, '#'); } } }