2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-29 05:17:57 +00:00

Change printf formats to not assume longs and ints are the same size

This commit is contained in:
Ted Lemon 1996-06-24 20:29:29 +00:00
parent ba1f12de85
commit b8b8bc8e37
2 changed files with 10 additions and 10 deletions

View File

@ -1530,15 +1530,15 @@ void convert_num (buf, str, base, size)
if (val > max) {
switch (base) {
case 8:
warn ("value %s%lo exceeds max (%d) for precision.",
warn ("value %s%o exceeds max (%d) for precision.",
negative ? "-" : "", val, max);
break;
case 16:
warn ("value %s%lx exceeds max (%d) for precision.",
warn ("value %s%x exceeds max (%d) for precision.",
negative ? "-" : "", val, max);
break;
default:
warn ("value %s%ld exceeds max (%d) for precision.",
warn ("value %s%u exceeds max (%d) for precision.",
negative ? "-" : "", val, max);
break;
}
@ -1556,7 +1556,7 @@ void convert_num (buf, str, base, size)
putLong (buf, -(unsigned long)val);
break;
default:
warn ("Unexpected integer size: %d\n");
warn ("Unexpected integer size: %d\n", size);
break;
}
} else {
@ -1571,7 +1571,7 @@ void convert_num (buf, str, base, size)
putULong (buf, val);
break;
default:
warn ("Unexpected integer size: %d\n");
warn ("Unexpected integer size: %d\n", size);
break;
}
}

View File

@ -1530,15 +1530,15 @@ void convert_num (buf, str, base, size)
if (val > max) {
switch (base) {
case 8:
warn ("value %s%lo exceeds max (%d) for precision.",
warn ("value %s%o exceeds max (%d) for precision.",
negative ? "-" : "", val, max);
break;
case 16:
warn ("value %s%lx exceeds max (%d) for precision.",
warn ("value %s%x exceeds max (%d) for precision.",
negative ? "-" : "", val, max);
break;
default:
warn ("value %s%ld exceeds max (%d) for precision.",
warn ("value %s%u exceeds max (%d) for precision.",
negative ? "-" : "", val, max);
break;
}
@ -1556,7 +1556,7 @@ void convert_num (buf, str, base, size)
putLong (buf, -(unsigned long)val);
break;
default:
warn ("Unexpected integer size: %d\n");
warn ("Unexpected integer size: %d\n", size);
break;
}
} else {
@ -1571,7 +1571,7 @@ void convert_num (buf, str, base, size)
putULong (buf, val);
break;
default:
warn ("Unexpected integer size: %d\n");
warn ("Unexpected integer size: %d\n", size);
break;
}
}