Only call strtoul when there is an argument that strtoul can work on

pull/35/head
Uwe Bonnes 2011-12-10 17:15:48 +01:00
rodzic 592276c939
commit 2edd0530a6
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -48,8 +48,8 @@ static int get_opts(struct opts* o, int ac, char** av)
o->devname = av[1];
i = 1;
}
o->size = strtoul(av[i + 3], NULL, 16);
if (ac > 3)
o->size = strtoul(av[i + 3], NULL, 16);
}
else if (strcmp(av[0], "write") == 0)
{