From: Reuben Thomas Date: Fri, 7 Jan 2011 23:22:28 +0000 (+0000) Subject: Remove some #if 0’d code that had no reason to be left in. X-Git-Tag: FILE5_07~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55dbd67e1f5f7e91aa4917cc28688a5a81ae4396;p=file Remove some #if 0’d code that had no reason to be left in. --- diff --git a/src/softmagic.c b/src/softmagic.c index 0f152273..47b15cc8 100644 --- a/src/softmagic.c +++ b/src/softmagic.c @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: softmagic.c,v 1.142 2010/10/24 14:42:07 christos Exp $") +FILE_RCSID("@(#)$File: softmagic.c,v 1.143 2010/12/22 18:14:06 christos Exp $") #endif /* lint */ #include "magic.h" @@ -144,7 +144,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, default: if (m->type == FILE_INDIRECT) returnval = 1; - + switch (magiccheck(ms, m)) { case -1: return -1; @@ -790,12 +790,6 @@ mconvert(struct magic_set *ms, struct magic *m) case FILE_LESTRING16: { /* Null terminate and eat *trailing* return */ p->s[sizeof(p->s) - 1] = '\0'; -#if 0 - /* Why? breaks magic numbers that end with \xa */ - len = strlen(p->s); - if (len-- && p->s[len] == '\n') - p->s[len] = '\0'; -#endif return 1; } case FILE_PSTRING: { @@ -806,12 +800,6 @@ mconvert(struct magic_set *ms, struct magic *m) while (len--) *ptr1++ = *ptr2++; *ptr1 = '\0'; -#if 0 - /* Why? breaks magic numbers that end with \xa */ - len = strlen(p->s); - if (len-- && p->s[len] == '\n') - p->s[len] = '\0'; -#endif return 1; } case FILE_BESHORT: