summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
288d1b0)
Avoid using strchrnul, it's a GNU addition. The code in question,
actually doesn't really benefit from strchrnul's behaviour.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* marker if it occurs at the beginning of the line, or after
* whitespace
*/
* 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 {
if (line == hashmarker)
line[0] = '\0';
else {
- while (hashmarker[0] != '\0') {
+ while (hashmarker != NULL) {
- if (isblank(hashmarker[0]))
+ if (isblank(hashmarker[0])) {
/*
* false positive; '#' occured
* within a string
*/
/*
* false positive; '#' occured
* within a string
*/
- hashmarker = strchrnul(hashmarker+2, '#');
+ hashmarker = strchr(hashmarker+2, '#');