Remove handrolled strcmp()'s
Favor readability over bare-metal.
This commit is contained in:
2
sed.c
2
sed.c
@@ -1114,7 +1114,7 @@ next_file(void)
|
||||
if (first) /* given no files, default to stdin */
|
||||
file = stdin;
|
||||
/* else we've used all our files, leave file = NULL */
|
||||
} else if ((*files)[0] == '-' && !(*files)[1]) {
|
||||
} else if (!strcmp(*files, "-")) {
|
||||
file = stdin;
|
||||
files++;
|
||||
} else if (!(file = fopen(*files++, "r"))) {
|
||||
|
Reference in New Issue
Block a user