07c187e
Description: Fix gcc-7 compile errors
07c187e
 * Fix comparison between pointer and zero character constant.
07c187e
 * Fix implicit fallthrough by adding a break (though the break will never be
07c187e
   reached since exit is called anyways).
07c187e
 * Add fallthrough comment where fallthrough is intentional.  Gcc parses this
07c187e
   comment and recognizes the fallthrough as intentional.
07c187e
Author: Lukas Schwaighofer <lukas@schwaighofer.name>
07c187e
07c187e
--- a/src/opt.c
07c187e
+++ b/src/opt.c
07c187e
@@ -222,6 +222,7 @@
07c187e
                 /* Print the version command option, cleanup and exit. */
07c187e
                 std_version();
07c187e
                 exit_cleanup(true);
07c187e
+                break;
07c187e
 
07c187e
             case 'h':
07c187e
                 MSG_DEBUG("-h or --help command option");
07c187e
@@ -229,6 +230,7 @@
07c187e
                 /* Print the help screen command option, cleanup and exit. */
07c187e
                 std_help();
07c187e
                 exit_cleanup(true);
07c187e
+                break;
07c187e
 
07c187e
             case '?':
07c187e
             case ':':
07c187e
@@ -285,8 +287,8 @@
07c187e
     }
07c187e
 
07c187e
     /* Re-initialize the interface name command option to no interface? */
07c187e
-    if (opt->interface != '\0')
07c187e
-        memset(opt->interface, '\0', (size_t)IF_NAMESIZE);
07c187e
+    if (opt->interface != NULL)
07c187e
+        memset(opt->interface, 0, (size_t)IF_NAMESIZE);
07c187e
 
07c187e
     /* Set the value of the interface name command option. */
07c187e
     memcpy(opt->interface, interface, len);
07c187e
--- a/src/sig.c
07c187e
+++ b/src/sig.c
07c187e
@@ -204,6 +204,7 @@
07c187e
             case SIGINT:
07c187e
                 /* Remove ^C symbol from the output terminal. */
07c187e
                 printf("\r");
07c187e
+		/* FALLTHRU */
07c187e
 
07c187e
             case SIGTERM:
07c187e
                 MSG_DEBUG("Caught %s (%d)..", SIG_ITOA(sig), sig);