From: Reuben Thomas Date: Mon, 11 Feb 2008 01:36:08 +0000 (+0000) Subject: Make not-equal 0 strength, not the same as = X-Git-Tag: FILE5_05~510 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d8ccfeba6deba12c619054f1a5f02d30fb2c9b6;p=file Make not-equal 0 strength, not the same as = --- diff --git a/src/apprentice.c b/src/apprentice.c index dc147f02..19c73d02 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -47,7 +47,7 @@ #endif #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.113 2008/02/04 20:51:17 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.114 2008/02/11 01:36:08 rrt Exp $") #endif /* lint */ #define EATAB {while (isascii((unsigned char) *l) && \ @@ -461,10 +461,10 @@ apprentice_magic_strength(const struct magic *m) switch (m->reln) { case 'x': /* matches anything penalize */ + case '!': /* matches almost anything penalize */ val = 0; break; - case '!': case '=': /* Exact match, prefer */ val += MULT; break;