Bug 1056233 - Fix uninitialized value in nsinstall.c. r=froydnj
authorChristian Holler <choller@mozilla.com>
Mon, 01 Sep 2014 14:30:11 +0200
changeset 224510 5ca3c0880050470ad429d980ce46a8d644a59c5b
parent 224509 8f3e3a79138cc3324f07761c6ba5fe6467dc225a
child 224511 3fcf08e891faafb3dfd28253d1e47ba32dc611ae
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1056233
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1056233 - Fix uninitialized value in nsinstall.c. r=froydnj
config/nsinstall.c
--- a/config/nsinstall.c
+++ b/config/nsinstall.c
@@ -405,21 +405,22 @@ main(int argc, char **argv)
 		    }
 
 		    len = strlen(linkname);
 		}
 		name = linkname;
 	    }
 
 	    /* Check for a pre-existing symlink with identical content. */
-	    if ((exists && (!S_ISLNK(tosb.st_mode) ||
+	    if (exists && (!S_ISLNK(tosb.st_mode) ||
 						readlink(toname, buf, sizeof buf) != len ||
-						strncmp(buf, name, (unsigned int)len) != 0)) || 
-			((stat(name, &fromsb) == 0) && 
-			 (fromsb.st_mtime > tosb.st_mtime))) {
+						strncmp(buf, name, (unsigned int)len) != 0 || 
+			((stat(name, &fromsb) == 0) &&
+			 (fromsb.st_mtime > tosb.st_mtime) 
+			 ))) {
 		(void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
 		exists = 0;
 	    }
 	    if (!exists && symlink(name, toname) < 0)
 		fail("cannot make symbolic link %s", toname);
 #ifdef HAVE_LCHOWN
 	    if ((owner || group) && lchown(toname, uid, gid) < 0)
 		fail("cannot change owner of %s", toname);