Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2010 08:52:59 +0000 (UTC)
From:      Ulrich Spoerlein <uqs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r208290 - head/usr.sbin/apm
Message-ID:  <201005190852.o4J8qxIK024014@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: uqs
Date: Wed May 19 08:52:59 2010
New Revision: 208290
URL: http://svn.freebsd.org/changeset/base/208290

Log:
  Garbage collect unused variable, missed in r200840
  
  Found by:	clang static analyzer

Modified:
  head/usr.sbin/apm/apm.c

Modified: head/usr.sbin/apm/apm.c
==============================================================================
--- head/usr.sbin/apm/apm.c	Wed May 19 08:52:51 2010	(r208289)
+++ head/usr.sbin/apm/apm.c	Wed May 19 08:52:59 2010	(r208290)
@@ -384,17 +384,12 @@ main(int argc, char *argv[])
 	int     dosleep = 0, all_info = 1, apm_status = 0, batt_status = 0;
 	int     display = -1, batt_life = 0, ac_status = 0, standby = 0;
 	int	batt_time = 0, delta = 0, enable = -1, haltcpu = -1;
-	char	*cmdname;
 	int	bioscall_available = 0;
 	size_t	cmos_wall_len = sizeof(cmos_wall);
 
 	if (sysctlbyname("machdep.wall_cmos_clock", &cmos_wall, &cmos_wall_len,
 	    NULL, 0) == -1)
 		err(1, "sysctlbyname(machdep.wall_cmos_clock)");
-	if ((cmdname = strrchr(argv[0], '/')) != NULL)
-		cmdname++;
-	else
-		cmdname = argv[0];
 
 	while ((c = getopt(argc, argv, "abe:h:lRr:stzd:Z")) != -1) {
 		switch (c) {



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