summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2013-05-25 22:11:19 -0700
committerDaniil Baturin <daniil@baturin.org>2013-05-25 22:11:19 -0700
commit069e78d6788b0e10272747f5d773ce9a167e90bc (patch)
tree2370cea779f5380d8233108ee009b5827cced278
parentaa7c28da716b15d8220c2af6b9448e033b176b98 (diff)
downloadipaddrcheck-069e78d6788b0e10272747f5d773ce9a167e90bc.tar.gz
ipaddrcheck-069e78d6788b0e10272747f5d773ce9a167e90bc.zip
Cleanup.
-rw-r--r--src/iptest.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/iptest.c b/src/iptest.c
index c2a7266..c618b20 100644
--- a/src/iptest.c
+++ b/src/iptest.c
@@ -57,7 +57,7 @@ int main(int argc, char* argv[])
{
char *address_str = ""; /* IP address string obtained from arguments */
int action = 0; /* Action associated with given check option */
- int* actions; /* Array of all given actions */
+ int* actions; /* Array of all given actions */
int action_count = 0; /* Actions array size */
int option_index = 0; /* Number of the current option for getopt call */
@@ -159,7 +159,8 @@ int main(int argc, char* argv[])
}
else
{
- printf("Error: wrong number of arguments, one argument required!\n");
+ fprintf(stderr, "Error: wrong number of arguments, one argument required!\n");
+ print_help();
return(EXIT_FAILURE);
}
@@ -200,7 +201,6 @@ int main(int argc, char* argv[])
break;
case IS_IPV4_HOST:
result = is_ipv4_host(address);
- printf("rsult %d\n", result);
break;
case IS_IPV4_NET:
/* XXX: Should we fail this check for single addresses? */
@@ -268,8 +268,8 @@ void print_help(void)
void print_version(void)
{
printf("%s %s\n", PACKAGE_NAME, PACKAGE_VERSION);
- printf("Copyright (C) Free Software Foundation, Inc.\n\
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
+ printf("Copyright (C) SO3Group 2013.\n\
+License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n\
This is free software: you are free to change and redistribute it.\n\
There is NO WARRANTY, to the extent permitted by law.\n");
}