svn commit: r209343 - head/usr.sbin/cpucontrol
Gavin Atkinson
gavin at FreeBSD.org
Sat Jun 19 16:29:24 UTC 2010
Author: gavin
Date: Sat Jun 19 16:29:23 2010
New Revision: 209343
URL: http://svn.freebsd.org/changeset/base/209343
Log:
Remove dead assignments, we overwrite the variable almost immediately.
Found by: clang static analyzer
Modified:
head/usr.sbin/cpucontrol/amd.c
head/usr.sbin/cpucontrol/intel.c
Modified: head/usr.sbin/cpucontrol/amd.c
==============================================================================
--- head/usr.sbin/cpucontrol/amd.c Sat Jun 19 16:24:55 2010 (r209342)
+++ head/usr.sbin/cpucontrol/amd.c Sat Jun 19 16:29:23 2010 (r209343)
@@ -92,9 +92,7 @@ amd_update(const char *dev, const char *
assert(dev);
fd = -1;
- devfd = -1;
fw_image = MAP_FAILED;
- error = 0;
devfd = open(dev, O_RDWR);
if (devfd < 0) {
WARN(0, "could not open %s for writing", dev);
Modified: head/usr.sbin/cpucontrol/intel.c
==============================================================================
--- head/usr.sbin/cpucontrol/intel.c Sat Jun 19 16:24:55 2010 (r209342)
+++ head/usr.sbin/cpucontrol/intel.c Sat Jun 19 16:29:23 2010 (r209343)
@@ -104,7 +104,6 @@ intel_update(const char *dev, const char
assert(dev);
fd = -1;
- devfd = -1;
fw_image = MAP_FAILED;
ext_table = NULL;
ext_header = NULL;
More information about the svn-src-all
mailing list