]> granicus.if.org Git - file/commitdiff
print a space between previous messages and error.
authorChristos Zoulas <christos@zoulas.com>
Tue, 16 Jun 2015 14:17:37 +0000 (14:17 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 16 Jun 2015 14:17:37 +0000 (14:17 +0000)
src/funcs.c

index b7160cc73474ce8d85903a6bfccaec5162c7919b..febd3bc3a0264de2651426734d387cbdd5bbdde4 100644 (file)
@@ -27,7 +27,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: funcs.c,v 1.81 2015/05/28 19:26:59 christos Exp $")
+FILE_RCSID("@(#)$File: funcs.c,v 1.82 2015/06/03 18:01:20 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -107,8 +107,10 @@ file_error_core(struct magic_set *ms, int error, const char *f, va_list va,
        if (lineno != 0) {
                free(ms->o.buf);
                ms->o.buf = NULL;
-               file_printf(ms, "line %" SIZE_T_FORMAT "u: ", lineno);
+               file_printf(ms, "line %" SIZE_T_FORMAT "u:", lineno);
        }
+       if (ms->o.buf && *ms->o.buf)
+               file_printf(ms, " ");
        file_vprintf(ms, f, va);
        if (error > 0)
                file_printf(ms, " (%s)", strerror(error));