Commit 008a71d2 authored by Linus Torvalds's avatar Linus Torvalds

Fix signedness tests in vsnprintf by making it explicit.

It used to depend on us having a signed type (which in turn is
incorrect for the later division).
parent 43a14457
......@@ -143,9 +143,9 @@ static char * number(char * buf, char * end, unsigned long long num, int base, i
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN) {
if (num < 0) {
if ((signed long long) num < 0) {
sign = '-';
num = -num;
num = - (signed long long) num;
size--;
} else if (type & PLUS) {
sign = '+';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment