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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user