Fix a few cppcheck warnings.
This commit is contained in:
parent
135231f289
commit
1dc90432cc
|
@ -30,12 +30,12 @@ void uli2a(unsigned long int num, unsigned int base, int uc, char *bf)
|
|||
d *= base;
|
||||
while (d != 0) {
|
||||
int dgt = num / d;
|
||||
num %= d;
|
||||
d /= base;
|
||||
if (n || dgt > 0 || d == 0) {
|
||||
if (n || dgt > 0) {
|
||||
*bf++ = dgt + (dgt < 10 ? '0' : (uc ? 'A' : 'a') - 10);
|
||||
++n;
|
||||
}
|
||||
num %= d;
|
||||
d /= base;
|
||||
}
|
||||
*bf = 0;
|
||||
}
|
||||
|
@ -59,12 +59,12 @@ void ui2a(unsigned int num, unsigned int base, int uc, char *bf)
|
|||
d *= base;
|
||||
while (d != 0) {
|
||||
int dgt = num / d;
|
||||
num %= d;
|
||||
d /= base;
|
||||
if (n || dgt > 0 || d == 0) {
|
||||
if (n || dgt > 0) {
|
||||
*bf++ = dgt + (dgt < 10 ? '0' : (uc ? 'A' : 'a') - 10);
|
||||
++n;
|
||||
}
|
||||
num %= d;
|
||||
d /= base;
|
||||
}
|
||||
*bf = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue