From acdfff93b6ca6a9c3981f7418adeac07362ceb30 Mon Sep 17 00:00:00 2001 From: Gavin Atkinson Date: Sat, 19 Jun 2010 16:29:23 +0000 Subject: [PATCH] Remove dead assignments, we overwrite the variable almost immediately. Found by: clang static analyzer --- usr.sbin/cpucontrol/amd.c | 2 -- usr.sbin/cpucontrol/intel.c | 1 - 2 files changed, 3 deletions(-) diff --git a/usr.sbin/cpucontrol/amd.c b/usr.sbin/cpucontrol/amd.c index bd36c9c128b4..be0e0de78292 100644 --- a/usr.sbin/cpucontrol/amd.c +++ b/usr.sbin/cpucontrol/amd.c @@ -92,9 +92,7 @@ amd_update(const char *dev, const char *path) 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); diff --git a/usr.sbin/cpucontrol/intel.c b/usr.sbin/cpucontrol/intel.c index 18c6e5e8365c..15ac939f9e50 100644 --- a/usr.sbin/cpucontrol/intel.c +++ b/usr.sbin/cpucontrol/intel.c @@ -104,7 +104,6 @@ intel_update(const char *dev, const char *path) assert(dev); fd = -1; - devfd = -1; fw_image = MAP_FAILED; ext_table = NULL; ext_header = NULL;