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