Handle errors from getopt
parent
27eaddb6b9
commit
839cc362a8
1
chat.c
1
chat.c
|
@ -97,6 +97,7 @@ int main(int argc, char *argv[]) {
|
||||||
break; case 'u': user = optarg;
|
break; case 'u': user = optarg;
|
||||||
break; case 'v': self.debug = true;
|
break; case 'v': self.debug = true;
|
||||||
break; case 'w': pass = optarg;
|
break; case 'w': pass = optarg;
|
||||||
|
break; default: return EX_USAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!host) errx(EX_USAGE, "host required");
|
if (!host) errx(EX_USAGE, "host required");
|
||||||
|
|
Loading…
Reference in New Issue