]> granicus.if.org Git - file/commitdiff
Print normal separator too when NUL separator used, as per man page. (Patch from...
authorReuben Thomas <rrt@sc3d.org>
Mon, 20 Sep 2010 21:00:44 +0000 (21:00 +0000)
committerReuben Thomas <rrt@sc3d.org>
Mon, 20 Sep 2010 21:00:44 +0000 (21:00 +0000)
src/file.c

index 3fbef87ec3134fe122365fa9cf504e3cb9f25706..1c5595d9b9a36e6c747f59262bcd641fdb130a83 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: file.c,v 1.136 2009/12/06 23:18:04 rrt Exp $")
+FILE_RCSID("@(#)$File: file.c,v 1.137 2010/09/20 14:14:49 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -422,9 +422,8 @@ process(struct magic_set *ms, const char *inname, int wid)
        if (wid > 0 && !bflag) {
                (void)printf("%s", std_in ? "/dev/stdin" : inname);
                if (nulsep)
-                       (void)putc('\0', stdout);
-               else
-                       (void)printf("%s", separator);
+                       (void)putc('\0', stdout);               
+               (void)printf("%s", separator);
                (void)printf("%*s ",
                    (int) (nopad ? 0 : (wid - file_mbswidth(inname))), "");
        }