summaryrefslogtreecommitdiff
path: root/e2fsprogs/fsck.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-12-26 20:56:55 +0000
committerDenis Vlasenko2007-12-26 20:56:55 +0000
commitc03e8721128fa7803d40dd07084f7650e88c7355 (patch)
treec13760bac677e9d4220477c0ac29ed9c2a52c1a4 /e2fsprogs/fsck.c
parentabee3d0e0dc7c7e4b733b0145c56bf8159a37a69 (diff)
downloadbusybox-c03e8721128fa7803d40dd07084f7650e88c7355.zip
busybox-c03e8721128fa7803d40dd07084f7650e88c7355.tar.gz
save a bit of code with *strchrnul = '\0' trick
function old new delta nextline 59 55 -4 include_conf 902 898 -4 read_config 414 406 -8 fsck_main 1880 1869 -11
Diffstat (limited to 'e2fsprogs/fsck.c')
-rw-r--r--e2fsprogs/fsck.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index f80de81..8dd9785 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -349,9 +349,7 @@ static int parse_fstab_line(char *line, struct fs_info **ret_fs)
*ret_fs = 0;
strip_line(line);
- cp = strchr(line, '#');
- if (cp)
- *cp = '\0'; /* Ignore everything after the comment char */
+ *strchrnul(line, '#') = '\0'; /* Ignore everything after comment */
cp = line;
device = parse_word(&cp);