aboutsummaryrefslogtreecommitdiff
path: root/writeups/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'writeups/ipv6')
-rw-r--r--writeups/ipv6/eyeball/Makefile7
-rw-r--r--writeups/ipv6/eyeball/eyeball.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/writeups/ipv6/eyeball/Makefile b/writeups/ipv6/eyeball/Makefile
index 939a53d..14ccb9d 100644
--- a/writeups/ipv6/eyeball/Makefile
+++ b/writeups/ipv6/eyeball/Makefile
@@ -1,3 +1,8 @@
-
eyeball: eyeball.c
cc -g -O0 -Wall -Wextra eyeball.c -o eyeball
+
+.PHONY: clean
+
+clean:
+ rm -f eyeball
+
diff --git a/writeups/ipv6/eyeball/eyeball.c b/writeups/ipv6/eyeball/eyeball.c
index fc01773..6ada24b 100644
--- a/writeups/ipv6/eyeball/eyeball.c
+++ b/writeups/ipv6/eyeball/eyeball.c
@@ -303,6 +303,10 @@ bool parse_args (const int argc, const char **argv) {
}
}
+ if (opts.flags.help) {
+ return true;
+ }
+
if (argc < optind + 2) {
fprintf(stderr, ARGV0": too few arguments\n");
return false;
@@ -450,7 +454,7 @@ ssize_t poll_result (void) {
if (g.th[0].err.ready && g.th[1].err.ready) {
// both failed
- return -1;
+ break;
}
// both still trying