cc-hash.c (fhash): The FILE name may be null.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 9 Jan 2013 03:56:20 +0000 (03:56 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 9 Jan 2013 03:57:28 +0000 (03:57 +0000)
So pass a dummy string on for the progress indicator.

cc-hash.c

index 00dcb39..64fea0e 100644 (file)
--- a/cc-hash.c
+++ b/cc-hash.c
@@ -298,7 +298,7 @@ int fhash(fhashstate *fh, const char *file, void *buf)
     return (-1);
 
   if (fh->f & FHF_PROGRESS) {
     return (-1);
 
   if (fh->f & FHF_PROGRESS) {
-    if (fprogress_init(&ff, file, fp)) return (-1);
+    if (fprogress_init(&ff, file ? file : "<stdin>", fp)) return (-1);
   }
 
   if (fh->f & FHF_JUNK) {
   }
 
   if (fh->f & FHF_JUNK) {