projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check for empty parameters in askfirst
[project/procd.git]
/
utils
/
askfirst.c
diff --git
a/utils/askfirst.c
b/utils/askfirst.c
index
e78823c
..
69de76f
100644
(file)
--- a/
utils/askfirst.c
+++ b/
utils/askfirst.c
@@
-31,8
+31,13
@@
int main(int argc, char **argv)
}
while (c != 0xA);
}
while (c != 0xA);
+ if (argc < 2) {
+ printf("%s needs to be called with at least 1 parameter\n", argv[0]);
+ return -1;
+ }
+
execvp(argv[1], &argv[1]);
execvp(argv[1], &argv[1]);
- printf("Failed to execute %s\n", argv[
0
]);
+ printf("Failed to execute %s\n", argv[
1
]);
return -1;
}
return -1;
}