fix getopt usage (C) unknown author

remote-dns
rofl0r 2011-09-10 23:13:26 +02:00
parent c377789d14
commit b1febc25d6
1 changed files with 3 additions and 3 deletions

View File

@ -46,15 +46,15 @@ int main(int argc, char *argv[]) {
int opt;
int start_argv = 1;
while ((opt = getopt(argc, argv, "fh:")) != -1) {
while ((opt = getopt(argc, argv, "hf:")) != -1) {
switch (opt) {
case 'h':
usage(argv);
break;
return EXIT_SUCCESS;
case 'f':
path = (char *)optarg;
if(!path) {
printf("error: no path supplied.");
printf("error: no path supplied.\n");
return(EXIT_FAILURE);
}
start_argv = 3;