Bug 1499870 - Fix -Wlogical-op-parentheses. r=mhowell
authorJeff Gilbert <jgilbert@mozilla.com>
Wed, 17 Oct 2018 21:11:27 +0000
changeset 500305 7ec4fa5ecac1ce50e8397ff76f64a604ebd6bdaa
parent 500304 252522eb134dfd5248abb499fb9515a22b23e9f3
child 500306 f6642653fb17ce9626fdc8afdba6208fcbe0e7fb
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhowell
bugs1499870
milestone64.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 1499870 - Fix -Wlogical-op-parentheses. r=mhowell Differential Revision: https://phabricator.services.mozilla.com/D9033
toolkit/components/maintenanceservice/workmonitor.cpp
--- a/toolkit/components/maintenanceservice/workmonitor.cpp
+++ b/toolkit/components/maintenanceservice/workmonitor.cpp
@@ -89,18 +89,18 @@ IsStatusApplying(LPCWSTR updateDirPath, 
  * @param  argc    The argc value normally sent to updater.exe
  * @param  argv    The argv value normally sent to updater.exe
  * @return boolean True if we're staging an update
  */
 static bool
 IsUpdateBeingStaged(int argc, LPWSTR *argv)
 {
   // PID will be set to -1 if we're supposed to stage an update.
-  return argc == 4 && !wcscmp(argv[3], L"-1") ||
-         argc == 5 && !wcscmp(argv[4], L"-1");
+  return (argc == 4 && !wcscmp(argv[3], L"-1")) ||
+         (argc == 5 && !wcscmp(argv[4], L"-1"));
 }
 
 /**
  * Determines whether the param only contains digits.
  *
  * @param str     The string to check
  * @param boolean True if the param only contains digits
  */
@@ -123,18 +123,18 @@ IsDigits(WCHAR *str)
  * @param argc    The argc value normally sent to updater.exe
  * @param argv    The argv value normally sent to updater.exe
  * @param boolean True if the command line contains just the directory to apply
  *                the update to
  */
 static bool
 IsOldCommandline(int argc, LPWSTR *argv)
 {
-  return argc == 4 && !wcscmp(argv[3], L"-1") ||
-         argc >= 4 && (wcsstr(argv[3], L"/replace") || IsDigits(argv[3]));
+  return (argc == 4 && !wcscmp(argv[3], L"-1")) ||
+         (argc >= 4 && (wcsstr(argv[3], L"/replace") || IsDigits(argv[3])));
 }
 
 /**
  * Gets the installation directory from the arguments passed to updater.exe.
  *
  * @param argcTmp    The argc value normally sent to updater.exe
  * @param argvTmp    The argv value normally sent to updater.exe
  * @param aResultDir Buffer to hold the installation directory.