diff options
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r-- | modutils/modprobe.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index bc2dbd1..f6681a8 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -242,11 +242,8 @@ static void include_conf(struct dep_t **first, struct dep_t **current, char *buf while (reads(fd, buffer, buflen)) { int l; - char *p; - p = strchr(buffer, '#'); - if (p) - *p = '\0'; + *strchrnul(buffer, '#') = '\0'; l = strlen(buffer); |