summaryrefslogtreecommitdiff
path: root/src/ascmagic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ascmagic.c')
-rw-r--r--src/ascmagic.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ascmagic.c b/src/ascmagic.c
index 3bb7359777b93..9d383be32163c 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;