summaryrefslogtreecommitdiff
path: root/usr.bin/file/magic-load.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-08-11 22:18:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-08-11 22:18:44 +0000
commit14677e68b840f42def6d55a1c04ba11cc9ef88ec (patch)
tree05c772d25d288d24b4d788daa94bec9ac56322ab /usr.bin/file/magic-load.c
parent6908b43e4b06bd96e096287fe15f40402eb7d83f (diff)
Extend accepted operators to +-&/%* for integer tests.
Diffstat (limited to 'usr.bin/file/magic-load.c')
-rw-r--r--usr.bin/file/magic-load.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/file/magic-load.c b/usr.bin/file/magic-load.c
index 7a30563a033..0a5ae8d445a 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.11 2015/08/11 22:12:48 nicm Exp $ */
+/* $OpenBSD: magic-load.c,v 1.12 2015/08/11 22:18:43 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -628,7 +628,7 @@ magic_parse_type(struct magic_line *ml, char **line)
goto done;
}
- cp = &s[strcspn(s, "-&")];
+ cp = &s[strcspn(s, "+-&/%*")];
if (*cp != '\0') {
ml->type_operator = *cp;
endptr = magic_strtoull(cp + 1, &ml->type_operand);