summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authoruqs <uqs@FreeBSD.org>2010-06-11 17:03:04 +0000
committeruqs <uqs@FreeBSD.org>2010-06-11 17:03:04 +0000
commit972d4b6a91487a21f17e0c177eb6e6d6c2f5ee48 (patch)
treea9605490041198fbb2e6a33939ff2d45d6980bc1 /sbin
parent392b002279067173fe32aa39afb0d5b699a64736 (diff)
downloadFreeBSD-src-972d4b6a91487a21f17e0c177eb6e6d6c2f5ee48.zip
FreeBSD-src-972d4b6a91487a21f17e0c177eb6e6d6c2f5ee48.tar.gz
Remove dead variable assignments
Found by: clang static analyzer Verified by: md5(1)
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ccdconfig/ccdconfig.c3
-rw-r--r--sbin/gbde/gbde.c2
-rw-r--r--sbin/iscontrol/config.c1
3 files changed, 2 insertions, 4 deletions
diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c
index 928aba5..5630c45 100644
--- a/sbin/ccdconfig/ccdconfig.c
+++ b/sbin/ccdconfig/ccdconfig.c
@@ -177,11 +177,10 @@ do_single(int argc, char **argv, int action)
*/
if (action == CCD_UNCONFIG || action == CCD_UNCONFIGALL) {
ex = 0;
- for (i = 0; argc != 0; ) {
+ for (; argc != 0;) {
cp = *argv++; --argc;
if ((ccd = resolve_ccdname(cp)) < 0) {
warnx("invalid ccd name: %s", cp);
- i = 1;
continue;
}
grq = gctl_get_handle();
diff --git a/sbin/gbde/gbde.c b/sbin/gbde/gbde.c
index 0a1e740..5f0462b 100644
--- a/sbin/gbde/gbde.c
+++ b/sbin/gbde/gbde.c
@@ -750,7 +750,7 @@ main(int argc, char **argv)
if (argc < 3)
usage();
- if ((i = modfind("g_bde")) < 0) {
+ if (modfind("g_bde") < 0) {
/* need to load the gbde module */
if (kldload(GBDEMOD) < 0 || modfind("g_bde") < 0)
err(1, GBDEMOD ": Kernel module not available");
diff --git a/sbin/iscontrol/config.c b/sbin/iscontrol/config.c
index d6d250d..df3a490 100644
--- a/sbin/iscontrol/config.c
+++ b/sbin/iscontrol/config.c
@@ -249,7 +249,6 @@ getConfig(FILE *fd, char *key, char **Ar, int *nargs)
switch(state) {
case 0:
if((p = strchr(lp, '{')) != NULL) {
- n = 0;
while((--p > lp) && *p && isspace(*p));
n = p - lp;
if(len && strncmp(lp, key, MAX(n, len)) == 0)
OpenPOWER on IntegriCloud