From: Ralph Corderoy Date: Fri, 25 Aug 2017 21:20:17 +0000 (+0100) Subject: picksbr.c: fprintf function pointer with unsigned-long-long cast. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/07916b2ff?hp=6db4565184f61a8fa55e32296fdad530ebf00d6b picksbr.c: fprintf function pointer with unsigned-long-long cast. 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. --- diff --git a/uip/picksbr.c b/uip/picksbr.c index 3f8a17c2..169a5bec 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -519,8 +519,7 @@ PRaction (struct nexus *n, int level) 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); }