summaryrefslogtreecommitdiffhomepage
path: root/modutils
diff options
context:
space:
mode:
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index bc2dbd128..f6681a8d8 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);