Reduce some var scopes

This commit is contained in:
Philippe Teuwen 2019-06-07 18:41:39 +02:00
commit 732bc766f9
52 changed files with 318 additions and 409 deletions

View file

@ -60,12 +60,10 @@ char const hex2ascii_data[] = "0123456789abcdefghijklmnopqrstuvwxyz";
*/
static char *
ksprintn(char *nbuf, uintmax_t num, int base, int *lenp, int upper) {
char *p, c;
p = nbuf;
char *p = nbuf;
*p = '\0';
do {
c = hex2ascii(num % base);
char c = hex2ascii(num % base);
*++p = upper ? toupper(c) : c;
} while (num /= base);
if (lenp)