From: Christos Zoulas Date: Fri, 14 Mar 2014 19:02:37 +0000 (+0000) Subject: PR/319: Remove superfluous call to file_ascmagic_with_encoding. file_encoding X-Git-Tag: FILE5_18~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6475ddc3531aec33a41e0c7fff042caa2e46aeaf;p=file PR/319: Remove superfluous call to file_ascmagic_with_encoding. file_encoding should have set looks_text correctly before, and file_ascmagic already calls file_ascmagic_with_encoding if it needs to. --- diff --git a/src/funcs.c b/src/funcs.c index fe1d70d8..863871d7 100644 --- a/src/funcs.c +++ b/src/funcs.c @@ -27,7 +27,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: funcs.c,v 1.68 2014/02/18 11:09:31 kim Exp $") +FILE_RCSID("@(#)$File: funcs.c,v 1.69 2014/03/06 16:03:39 christos Exp $") #endif /* lint */ #include "magic.h" @@ -263,19 +263,6 @@ file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((unu (void)fprintf(stderr, "ascmagic %d\n", m); goto done; } - - /* try to discover text encoding */ - if ((ms->flags & MAGIC_NO_CHECK_ENCODING) == 0) { - if (looks_text == 0) - if ((m = file_ascmagic_with_encoding( ms, ubuf, - nb, u8buf, ulen, code, ftype, looks_text)) - != 0) { - if ((ms->flags & MAGIC_DEBUG) != 0) - (void)fprintf(stderr, - "ascmagic/enc %d\n", m); - goto done; - } - } } simple: