Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jun 2010 13:03:25 +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: r209157 - head/games/random
Message-ID:  <201006141303.o5ED3PCO059450@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: uqs
Date: Mon Jun 14 13:03:25 2010
New Revision: 209157
URL: http://svn.freebsd.org/changeset/base/209157

Log:
  random(6): avoid dead assignments
  
  Found by:	clang static analyzer

Modified:
  head/games/random/random.c
  head/games/random/randomize_fd.c

Modified: head/games/random/random.c
==============================================================================
--- head/games/random/random.c	Mon Jun 14 08:24:00 2010	(r209156)
+++ head/games/random/random.c	Mon Jun 14 13:03:25 2010	(r209157)
@@ -73,7 +73,7 @@ main(int argc, char *argv[])
 	denom = 0;
 	filename = "/dev/fd/0";
 	random_type = RANDOM_TYPE_UNSET;
-	random_exit = randomize_lines = random_type = unbuffer_output = 0;
+	random_exit = randomize_lines = unbuffer_output = 0;
 	unique_output = 1;
 
 	(void)setlocale(LC_CTYPE, "");

Modified: head/games/random/randomize_fd.c
==============================================================================
--- head/games/random/randomize_fd.c	Mon Jun 14 08:24:00 2010	(r209156)
+++ head/games/random/randomize_fd.c	Mon Jun 14 13:03:25 2010	(r209157)
@@ -104,7 +104,7 @@ randomize_fd(int fd, int type, int uniqu
 
 	rand_root = rand_tail = NULL;
 	bufc = i = 0;
-	bufleft = eof = fndstr = numnode = ret = 0;
+	bufleft = eof = fndstr = numnode = 0;
 
 	if (type == RANDOM_TYPE_UNSET)
 		type = RANDOM_TYPE_LINES;



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