Fixed a number of uses of uninitialized variables by adding assertions
or other sanity checks, code reshuffling, or fixing broken behavior.
This commit is contained in:
@@ -107,6 +107,7 @@ o_print(va_list *ap, int flags, char *s, char c, int precision, int is_signed)
|
||||
case 'x':
|
||||
case 'X':
|
||||
case 'p': base = 16; break;
|
||||
default: base = 10; break;
|
||||
}
|
||||
|
||||
s = _i_compute(unsigned_val, base, s, precision);
|
||||
|
||||
@@ -46,6 +46,7 @@ o_collect(register int c, register FILE *stream, char type,
|
||||
case 'u': base = 10; break;
|
||||
case 'o': base = 8; break;
|
||||
case 'b': base = 2; break;
|
||||
default: base = 10; break;
|
||||
}
|
||||
|
||||
if (c == '-' || c == '+') {
|
||||
|
||||
Reference in New Issue
Block a user