From 874d317334fae1ddce316f9b6f4d0ce4e434bf52 Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Tue, 23 Jun 2026 21:34:41 -0700 Subject: heirloom vi fixes from arch AUR --- printf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'printf.c') diff --git a/printf.c b/printf.c index 1c95186..61e1630 100644 --- a/printf.c +++ b/printf.c @@ -99,7 +99,7 @@ char *p_dconv(long, char *); static int p_emit(char *, char *); int -printf(const char *fmt, ...) +ex_printf(char *fmt, ...) { va_list ap; int ret; @@ -252,7 +252,7 @@ vprintf(const char *fmt, va_list ap) *--bptr = ((int) num & mask1) + 060; else *--bptr = ((int) num & mask1) + 0127; - while (num = (num >> nbits) & mask2); + while ((num = (num >> nbits) & mask2)); if (fcode=='o') { if (n) @@ -288,7 +288,7 @@ vprintf(const char *fmt, va_list ap) else num = (long) n; } - if (n = (fcode != 'u' && num < 0)) + if ((n = (fcode != 'u' && num < 0))) num = -num; /* now convert to digits */ bptr = p_dconv(num, buf); @@ -359,7 +359,7 @@ p_dconv(long value, char *buffer) */ bp += MAXDIGS + 1; while (value > LRGINT) { - *--bp = (int)(value % 10) + '0'; + *--bp = (value % 10) + '0'; value /= 10; } -- cgit v1.2.3