From 07566bb419a3cf2992a7bcb888e896123078b8d9 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Fri, 7 Jan 2011 23:22:28 +0000 Subject: =?UTF-8?q?Remove=20some=20#if=200=C3=A2=C2=80=C2=99d=20code=20tha?= =?UTF-8?q?t=20had=20no=20reason=20to=20be=20left=20in.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/softmagic.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/softmagic.c b/src/softmagic.c index 0524bdd8..99a7b524 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.143 2010/12/22 18:14:06 christos Exp $") +FILE_RCSID("@(#)$File: softmagic.c,v 1.144 2011/01/07 23:22:28 rrt 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: -- cgit v1.2.1