meminfo-writer: simple command line sanity checks

This commit is contained in:
Vincent Penquerc'h 2013-12-26 10:38:42 -05:00 committed by Marek Marczykowski-Górecki
parent 0c718b7f54
commit 1a72505d24

View File

@ -111,7 +111,7 @@ int main(int argc, char **argv)
usage();
used_mem_change_threshold = atoi(argv[1]);
delay = atoi(argv[2]);
if (!used_mem_change_threshold || !delay)
if (used_mem_change_threshold <= 0 || delay <= 0)
usage();
if (argc == 4) {