diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1994-09-27 03:34:58 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1994-09-27 03:34:58 +0000 |
| commit | 169cd910b717c5ff92241e9443866a05c6d84cc3 (patch) | |
| tree | b13b160261863493c90b5ffb69d4f2d9d57071f0 /sys/ddb/db_output.c | |
| parent | 38ddc3a6d6dfa77c1df83ea0faf2ff79c46973ef (diff) | |
Notes
Diffstat (limited to 'sys/ddb/db_output.c')
| -rw-r--r-- | sys/ddb/db_output.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c index f2b14e4789a2..5fa5cb80b873 100644 --- a/sys/ddb/db_output.c +++ b/sys/ddb/db_output.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_output.c,v 1.7 1994/08/13 03:49:21 wollman Exp $ + * $Id: db_output.c,v 1.8 1994/08/27 16:14:09 davidg Exp $ */ /* @@ -251,13 +251,14 @@ reswitch: switch (ch = *(u_char *)fmt++) { case 'b': ul = va_arg(ap, int); p = va_arg(ap, char *); - for (p = db_ksprintn(ul, *p++, NULL); ch = *p--;) - db_putchar(ch); + for (p = db_ksprintn(ul, *p++, NULL); *p;p--) + db_putchar(*p); if (!ul) break; - for (tmp = 0; n = *p++;) { + for (tmp = 0; *p;) { + n = *p++; if (ul & (1 << (n - 1))) { db_putchar(tmp ? ',' : '<'); for (; (n = *p) > ' '; ++p) @@ -285,8 +286,8 @@ reswitch: switch (ch = *(u_char *)fmt++) { if (!ladjust && width > 0) while (width--) db_putchar (padc); - while (ch = *p++) - db_putchar(ch); + for (;*p;p++) + db_putchar(*p); if (ladjust && width > 0) while (width--) db_putchar (padc); @@ -361,8 +362,8 @@ number: p = (char *)db_ksprintn(ul, base, &tmp); while (width--) db_putchar(padc); - while (ch = *p--) - db_putchar(ch); + for (;*p;p--) + db_putchar(*p); break; default: db_putchar('%'); |
