chiark / gitweb /
another notice_processed fix
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 29 May 2010 17:18:53 +0000 (18:18 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 29 May 2010 17:18:53 +0000 (18:18 +0100)
statemc.c

index dda412d..58aaefd 100644 (file)
--- a/statemc.c
+++ b/statemc.c
@@ -227,11 +227,9 @@ static void notice_processed_counts(Counts *counts, int completed,
 
 #define CNT(art,rc) (counts->results[art_##art][RC_##rc])
 
-  assert(!completed || ipf_xtra);
-
-  char *inprog= completed
-    ? xasprintf("%s","") /* GCC produces a stupid warning for printf("") ! */
-    : xasprintf(" inprogress=%ld", ipf_xtra->inprogress);
+  char *inprog= ipf_xtra && !completed
+    ? xasprintf(" inprogress=%ld", ipf_xtra->inprogress)
+    : xasprintf("%s",""); /* GCC produces a stupid warning for printf("") ! */
   char *autodefer= ipf_xtra && ipf_xtra->autodefer >= 0
     ? xasprintf(" autodeferred=%ld", ipf_xtra->autodefer)
     : xasprintf("%s","");