From 16a4e5460acce27012e49b4a9f33a278517c6cab Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Fri, 6 Jun 2014 14:37:08 +0200 Subject: ipcalc: -c allow netmask --- src/ipcalc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ipcalc.c b/src/ipcalc.c index 6a803f11..9108e4c2 100644 --- a/src/ipcalc.c +++ b/src/ipcalc.c @@ -319,8 +319,8 @@ int main(int argc, const char **argv) { } } - if (showBroadcast || showNetwork || showPrefix) { - if (!(netmaskStr = (char *) poptGetArg(optCon)) && (prefix < 0)) { + if (showBroadcast || showNetwork || showPrefix || doCheck) { + if (!(netmaskStr = (char *) poptGetArg(optCon)) && (prefix < 0 && !doCheck)) { if (!beSilent) { fprintf(stderr, "ipcalc: netmask or prefix expected\n"); poptPrintHelp(optCon, stderr, 0); -- cgit v1.2.1