Remove handrolled strcmp()'s
Favor readability over bare-metal.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "utf.h"
|
||||
#include "util.h"
|
||||
@@ -153,7 +154,7 @@ main(int argc, char *argv[])
|
||||
unexpand("<stdin>", stdin);
|
||||
} else {
|
||||
for (; *argv; argc--, argv++) {
|
||||
if ((*argv)[0] == '-' && !(*argv)[1]) {
|
||||
if (!strcmp(*argv, "-")) {
|
||||
*argv = "<stdin>";
|
||||
fp = stdin;
|
||||
} else if (!(fp = fopen(*argv, "r"))) {
|
||||
|
Reference in New Issue
Block a user