sleep: don't just crash on missing arg
This commit is contained in:
parent
f38a61f6c4
commit
545425ce36
@ -13,6 +13,11 @@
|
||||
int main(int argc, char ** argv) {
|
||||
int ret = 0;
|
||||
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "%s: missing operand\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
char * arg = strdup(argv[1]);
|
||||
|
||||
float time = atof(arg);
|
||||
|
Loading…
Reference in New Issue
Block a user