mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Address coverity issues detected in util.c
This commit is contained in:
committed by
Simon Kelley
parent
5b5ec55445
commit
94a17fd97f
@@ -550,7 +550,7 @@ void prettyprint_time(char *buf, unsigned int t)
|
|||||||
if ((x = (t/60)%60))
|
if ((x = (t/60)%60))
|
||||||
p += sprintf(&buf[p], "%um", x);
|
p += sprintf(&buf[p], "%um", x);
|
||||||
if ((x = t%60))
|
if ((x = t%60))
|
||||||
p += sprintf(&buf[p], "%us", x);
|
sprintf(&buf[p], "%us", x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -596,7 +596,7 @@ int parse_hex(char *in, unsigned char *out, int maxlen,
|
|||||||
int j, bytes = (1 + (r - in))/2;
|
int j, bytes = (1 + (r - in))/2;
|
||||||
for (j = 0; j < bytes; j++)
|
for (j = 0; j < bytes; j++)
|
||||||
{
|
{
|
||||||
char sav = sav;
|
char sav;
|
||||||
if (j < bytes - 1)
|
if (j < bytes - 1)
|
||||||
{
|
{
|
||||||
sav = in[(j+1)*2];
|
sav = in[(j+1)*2];
|
||||||
|
|||||||
Reference in New Issue
Block a user