]> granicus.if.org Git - file/commitdiff
Don't print ": " if progname is somehow trashed.
authorIan Darwin <ian@darwinsys.com>
Thu, 12 Nov 1987 13:00:24 +0000 (13:00 +0000)
committerIan Darwin <ian@darwinsys.com>
Thu, 12 Nov 1987 13:00:24 +0000 (13:00 +0000)
src/print.c

index 5a99588615ae4542b20de2b58f3e68c65dd999ed..8fb8b6b93be195fc935b3d7898bf6c21318ea400 100644 (file)
@@ -31,7 +31,7 @@
 
 #ifndef        lint
 static char *moduleid = 
-       "@(#)$Header: /home/glen/git/file/cvs/file/src/print.c,v 1.9 1987/11/06 21:29:50 ian Exp $";
+       "@(#)$Header: /home/glen/git/file/cvs/file/src/print.c,v 1.10 1987/11/12 13:00:24 ian Exp $";
 #endif /* lint */
 
 #define MAXSTR         500
@@ -81,10 +81,11 @@ char *f, *a;
        int myerrno;
 
        myerrno = errno;
-       if (progname != NULL)
+       if (progname != NULL) {
                (void) fputs(progname, stderr);
-       (void) putc(':', stderr);
-       (void) putc(' ', stderr);
+               (void) putc(':', stderr);
+               (void) putc(' ', stderr);
+       }
        (void) fprintf(stderr, f, a);
        if (myerrno > 0 && myerrno < sys_nerr)
                (void) fprintf(stderr, " (%s)", sys_errlist[myerrno]);