From: Reuben Thomas Date: Mon, 20 Sep 2010 21:00:44 +0000 (+0000) Subject: Print normal separator too when NUL separator used, as per man page. (Patch from... X-Git-Tag: FILE5_07~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=108a0529d69d25b1f596eff76b5aa73e67036de8;p=file Print normal separator too when NUL separator used, as per man page. (Patch from Fedora.) --- diff --git a/src/file.c b/src/file.c index 3fbef87e..1c5595d9 100644 --- a/src/file.c +++ b/src/file.c @@ -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))), ""); }