]> diplodocus.org Git - nmh/commitdiff
picksbr.c: fprintf function pointer with unsigned-long-long cast.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 25 Aug 2017 21:20:17 +0000 (22:20 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sat, 26 Aug 2017 07:36:01 +0000 (08:36 +0100)
It was previously a double cast, to unsigned long, and then to unsigned
int, and formatted with `0x%x'.  Now we're C99, at least, we can use
unsigned long long and `%#llx'.  Though the fprintf() in question should
be a BUG() that abort(3)s.

uip/picksbr.c

index 3f8a17c..169a5be 100644 (file)
@@ -519,8 +519,7 @@ PRaction (struct nexus *n, int level)
                dasctime (&n->n_tws, TW_NULL));
        return;
     }
                dasctime (&n->n_tws, TW_NULL));
        return;
     }
-    fprintf (stderr, "UNKNOWN(0x%x)\n",
-            (unsigned int)(unsigned long) (*n->n_action));
+    fprintf(stderr, "UNKNOWN(%#llx)\n", (unsigned long long)n->n_action);
 }
 
 
 }