Fix bad use of unsigned integers.
Unsigned values should never be compared to values less than zero. Detected with "find_unsigned.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
6fb0f6f4c6
commit
a5a9ee60d6
@ -270,9 +270,10 @@ custom_load_conf (struct conf *conf, int background)
|
||||
var = 0;
|
||||
break;
|
||||
case CUSTOM_CONF_PERIODICSAVE:
|
||||
conf->periodic_save = atoi (e_conf);
|
||||
if (conf->periodic_save < 0)
|
||||
if (atoi (e_conf) < 0)
|
||||
conf->periodic_save = 0;
|
||||
else
|
||||
conf->periodic_save = atoi (e_conf);
|
||||
var = 0;
|
||||
break;
|
||||
case CUSTOM_CONF_CONFIRMQUIT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user