Skip to content

Commit

Permalink
Update commandline.c
Browse files Browse the repository at this point in the history
  • Loading branch information
liudf0716 authored May 5, 2017
1 parent 7c708e0 commit 79cbacd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions commandline.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
/** @internal
* @brief Print usage
*
* Prints usage, called when wifidog is run with -h or with an unknown option
* Prints usage
*/
void
usage(void)
usage(const char *appname)
{
fprintf(stdout, "Usage: xkcp_client [options]\n");
fprintf(stdout, "Usage: %s [options]\n", appname);
fprintf(stdout, "\n");
fprintf(stdout, "options:\n");
fprintf(stdout, " -c [filename] Use this config file\n");
Expand All @@ -69,7 +69,7 @@ parse_commandline(int argc, char **argv)
switch (c) {

case 'h':
usage();
usage(argv[0]);
exit(1);
break;

Expand All @@ -92,12 +92,12 @@ parse_commandline(int argc, char **argv)
break;

case 'v':
fprintf(stdout, "This is xkcp client version " VERSION "\n");
fprintf(stdout, "This is xkcp version " VERSION "\n");
exit(1);
break;

default:
usage();
usage(argv[0]);
exit(1);
break;

Expand Down

0 comments on commit 79cbacd

Please sign in to comment.