Bug 1338086 - Remove useless else blocks in order to reduce complexity in toolkit/mozapps/update/updater/ r?ehsan draft
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 09 Feb 2017 10:57:33 +0100
changeset 484408 a98c23f0935c6734e4db2df80aa9a42c46961a8d
parent 484407 31b7a5ca298864d3f436d82b702c898262e87883
child 484409 12841f531dc3d313f241a5a150e63d0efeb5779c
push id45470
push userbmo:sledru@mozilla.com
push dateWed, 15 Feb 2017 08:57:47 +0000
reviewersehsan
bugs1338086
milestone54.0a1
Bug 1338086 - Remove useless else blocks in order to reduce complexity in toolkit/mozapps/update/updater/ r?ehsan MozReview-Commit-ID: 3X4CIucTfGG
toolkit/mozapps/update/updater/updater.cpp
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -894,19 +894,18 @@ static int rename_file(const NS_tchar *s
     return READ_ERROR;
   }
 
   if (!S_ISREG(spathInfo.st_mode)) {
     if (allowDirs && !S_ISDIR(spathInfo.st_mode)) {
       LOG(("rename_file: path present, but not a file: " LOG_S ", err: %d",
            spath, errno));
       return RENAME_ERROR_EXPECTED_FILE;
-    } else {
-      LOG(("rename_file: proceeding to rename the directory"));
     }
+    LOG(("rename_file: proceeding to rename the directory"));
   }
 
   if (!NS_taccess(dpath, F_OK)) {
     if (ensure_remove(dpath)) {
       LOG(("rename_file: destination file exists and could not be " \
            "removed: " LOG_S, dpath));
       return WRITE_ERROR_DELETE_FILE;
     }