mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2024-12-22 12:18:47 +00:00
fix getopt usage (C) unknown author
This commit is contained in:
parent
c377789d14
commit
b1febc25d6
@ -46,15 +46,15 @@ int main(int argc, char *argv[]) {
|
|||||||
int opt;
|
int opt;
|
||||||
int start_argv = 1;
|
int start_argv = 1;
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "fh:")) != -1) {
|
while ((opt = getopt(argc, argv, "hf:")) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'h':
|
case 'h':
|
||||||
usage(argv);
|
usage(argv);
|
||||||
break;
|
return EXIT_SUCCESS;
|
||||||
case 'f':
|
case 'f':
|
||||||
path = (char *)optarg;
|
path = (char *)optarg;
|
||||||
if(!path) {
|
if(!path) {
|
||||||
printf("error: no path supplied.");
|
printf("error: no path supplied.\n");
|
||||||
return(EXIT_FAILURE);
|
return(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
start_argv = 3;
|
start_argv = 3;
|
||||||
|
Loading…
Reference in New Issue
Block a user