Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Aug 2012 07:45:26 +0000 (UTC)
From:      Maxim Konovalov <maxim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r239894 - stable/9/games/pom
Message-ID:  <201208300745.q7U7jQhR001622@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: maxim
Date: Thu Aug 30 07:45:25 2012
New Revision: 239894
URL: http://svn.freebsd.org/changeset/base/239894

Log:
  MFC r230644: preserve argv[0] to use it later in usage().

Modified:
  stable/9/games/pom/pom.c
Directory Properties:
  stable/9/games/pom/   (props changed)

Modified: stable/9/games/pom/pom.c
==============================================================================
--- stable/9/games/pom/pom.c	Thu Aug 30 07:38:24 2012	(r239893)
+++ stable/9/games/pom/pom.c	Thu Aug 30 07:45:25 2012	(r239894)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208300745.q7U7jQhR001622>