aboutsummaryrefslogtreecommitdiffstats
path: root/src/ipcalc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcalc.c')
-rw-r--r--src/ipcalc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ipcalc.c b/src/ipcalc.c
index 56b5ae87..ad279587 100644
--- a/src/ipcalc.c
+++ b/src/ipcalc.c
@@ -10,7 +10,7 @@
*
* Authors:
* Erik Troan <ewt@redhat.com>
- * Preston Brown <pbrown@redhat.com
+ * Preston Brown <pbrown@redhat.com>
*/
@@ -290,6 +290,11 @@ int main(int argc, const char **argv) {
}
poptFreeContext(optCon);
+
+ if (!(showNetmask|showPrefix|showBroadcast|showNetwork|showHostname)) {
+ poptPrintHelp(optCon, stderr, 0);
+ return 1;
+ }
/* we know what we want to display now, so display it. */