summaryrefslogtreecommitdiff
path: root/src/ascmagic.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-01-02 20:23:27 +0000
committer <>2015-02-03 17:27:18 +0000
commit670c2bbcffe873a2b8589ed140c12e7923ef20c0 (patch)
tree41044880e826d60621a2d636ed71283de5e0e291 /src/ascmagic.c
parent3b49db406667ee7189b9ea69b9d9e0bdcc43c5b7 (diff)
downloadfile-670c2bbcffe873a2b8589ed140c12e7923ef20c0.tar.gz
Imported from /home/lorry/working-area/delta_file/file-5.22.tar.gz.file-5.22
Diffstat (limited to 'src/ascmagic.c')
-rw-r--r--src/ascmagic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ascmagic.c b/src/ascmagic.c
index 000c9de..78a6dbb 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.85 2012/08/09 16:33:15 christos Exp $")
+FILE_RCSID("@(#)$File: ascmagic.c,v 1.91 2014/11/28 02:46:39 christos Exp $")
#endif /* lint */
#include "magic.h"
@@ -72,7 +72,7 @@ file_ascmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
int text)
{
unichar *ubuf = NULL;
- size_t ulen;
+ size_t ulen = 0;
int rv = 1;
const char *code = NULL;
@@ -147,7 +147,8 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
== NULL)
goto done;
if ((rv = file_softmagic(ms, utf8_buf,
- (size_t)(utf8_end - utf8_buf), TEXTTEST, text)) == 0)
+ (size_t)(utf8_end - utf8_buf), 0, NULL,
+ TEXTTEST, text)) == 0)
rv = -1;
}
@@ -211,6 +212,7 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
case 0:
if (file_printf(ms, ", ") == -1)
goto done;
+ break;
case -1:
goto done;
default: