Bug 1056233 - Fix uninitialized value in nsinstall.c. r=froydnj

--HG--
extra : rebase_source : 8d59e5ea240afb5ec07673bb7eb9085aed793a95
This commit is contained in:
Christian Holler 2014-09-01 14:30:11 +02:00
parent 0636882ed7
commit 73b680f1ca

View File

@ -410,11 +410,12 @@ main(int argc, char **argv)
}
/* 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;
}