hfingerd

hhvn.uk:79
Log | Files | Refs | LICENSE

commit edb499d012cf5f10d67a540631571d386be2b4d3
parent b76527e61ef9ccbf5f126910c6b30cfd640868df
Author: hhvn <dev@hhvn.uk>
Date:   Sun,  6 Jun 2021 14:17:43 +0100

main.c: usage() on unknown args and options

Diffstat:
Mmain.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c @@ -167,8 +167,13 @@ main(int argc, char *argv[]) { case 'v': verbosebool = 1; break; + default: + usage(); } ARGEND; + if (argc != 0) + usage(); + memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_flags = AI_PASSIVE;