aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorMaxim Konovalov <maxim@FreeBSD.org>2012-01-28 15:29:43 +0000
committerMaxim Konovalov <maxim@FreeBSD.org>2012-01-28 15:29:43 +0000
commitb5de771b40adc40ec6d80a37ac58065663c5e048 (patch)
treee986b5b6acea4cfcd2e8fc755253d375514f586b /games
parent5d7380f8e34f0083b4b1b9cc1b0872972ffe1b48 (diff)
downloadsrc-b5de771b40adc40ec6d80a37ac58065663c5e048.tar.gz
src-b5de771b40adc40ec6d80a37ac58065663c5e048.zip
o Preserve argv[0] to use it later in usage().
PR: bin/164570 Submitted by: Klaus Aehlig MFC after: 1 week
Notes
Notes: svn path=/head/; revision=230644
Diffstat (limited to 'games')
-rw-r--r--games/pom/pom.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/games/pom/pom.c b/games/pom/pom.c
index f333bec8e1d6..5f18bb3feaac 100644
--- a/games/pom/pom.c
+++ b/games/pom/pom.c
@@ -86,6 +86,7 @@ main(int argc, char **argv)
double days, today, tomorrow;
int ch, cnt, pflag = 0;
char *odate = NULL, *otime = NULL;
+ char *progname = argv[0];
while ((ch = getopt(argc, argv, "d:pt:")) != -1)
switch (ch) {
@@ -99,14 +100,14 @@ main(int argc, char **argv)
otime = optarg;
break;
default:
- usage(argv[0]);
+ usage(progname);
}
argc -= optind;
argv += optind;
if (argc)
- usage(argv[0]);
+ usage(progname);
/* Adjust based on users preferences */
time(&tt);