diff options
author | nicm <nicm@openbsd.org> | 2016-05-01 14:57:15 +0000 |
---|---|---|
committer | nicm <nicm@openbsd.org> | 2016-05-01 14:57:15 +0000 |
commit | e5597b9245ab6711cc3d29906dc126ef800a2a14 (patch) | |
tree | fcec817deb7db9f922fce82906aa5d6baa03a815 /usr.bin/file | |
parent | Remove a bogus "else" that was causing breakage with LCP echoes, (diff) | |
download | wireguard-openbsd-e5597b9245ab6711cc3d29906dc126ef800a2a14.tar.xz wireguard-openbsd-e5597b9245ab6711cc3d29906dc126ef800a2a14.zip |
Exact match use and name with strcmp rather than prefix with strncmp.
Diffstat (limited to 'usr.bin/file')
-rw-r--r-- | usr.bin/file/magic-load.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/file/magic-load.c b/usr.bin/file/magic-load.c index c07074cf015..51f4decde4e 100644 --- a/usr.bin/file/magic-load.c +++ b/usr.bin/file/magic-load.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magic-load.c,v 1.22 2016/05/01 10:56:03 nicm Exp $ */ +/* $OpenBSD: magic-load.c,v 1.23 2016/05/01 14:57:15 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -638,12 +638,12 @@ magic_parse_type(struct magic_line *ml, char **line) ml->type_operator = ' '; ml->type_operand = 0; - if (strncmp(s, "name", (sizeof "name") - 1) == 0) { + if (strcmp(s, "name") == 0) { ml->type = MAGIC_TYPE_NAME; ml->type_string = xstrdup(s); goto done; } - if (strncmp(s, "use", (sizeof "use") - 1) == 0) { + if (strcmp(s, "use") == 0) { ml->type = MAGIC_TYPE_USE; ml->type_string = xstrdup(s); goto done; |