diff options
author | Xin LI <delphij@FreeBSD.org> | 2020-06-17 01:11:26 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2020-06-17 01:11:26 +0000 |
commit | 2d24dbcf45a851fa5c7960160b7b4a28ff373558 (patch) | |
tree | 6ed1c5484166da73032c8f6ed3bb82a5dadf914a /src/ascmagic.c | |
parent | f210d1e9efd4183d390c24c9ea576896222d4540 (diff) |
Notes
Diffstat (limited to 'src/ascmagic.c')
-rw-r--r-- | src/ascmagic.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ascmagic.c b/src/ascmagic.c index 3bb7359777b9..9d383be32163 100644 --- a/src/ascmagic.c +++ b/src/ascmagic.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: ascmagic.c,v 1.105 2019/06/08 20:49:14 christos Exp $") +FILE_RCSID("@(#)$File: ascmagic.c,v 1.107 2020/06/08 19:58:36 christos Exp $") #endif /* lint */ #include "magic.h" @@ -115,7 +115,6 @@ file_ascmagic_with_encoding(struct magic_set *ms, int need_separator = 0; const char *subtype = NULL; - const char *subtype_mime = NULL; int has_escapes = 0; int has_backspace = 0; @@ -164,8 +163,11 @@ file_ascmagic_with_encoding(struct magic_set *ms, goto done; } } - if ((ms->flags & (MAGIC_APPLE|MAGIC_EXTENSION))) - return 0; + + if ((ms->flags & (MAGIC_APPLE|MAGIC_EXTENSION))) { + rv = 0; + goto done; + } /* Now try to discover other details about the file. */ for (i = 0; i < ulen; i++) { @@ -222,10 +224,6 @@ file_ascmagic_with_encoding(struct magic_set *ms, } if (need_separator && file_separator(ms) == -1) goto done; - } - if (subtype_mime) { - if (file_printf(ms, "%s", subtype_mime) == -1) - goto done; } else { if (file_printf(ms, "text/plain") == -1) goto done; |