Bug 1557501 - C-C part: Fix typo in rev ffde4bb2fe1b. r=me
authorJorg K <jorgk@jorgk.com>
Fri, 07 Jun 2019 20:27:19 +0200
changeset 35803 d00844c4eba4bd98a20376942673520047193337
parent 35802 ffde4bb2fe1bbca3a4b9ecd027032c1b90f0c5d3
child 35804 e5ed77a2a024206e348ebc9ea509d95cee64382b
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersme
bugs1557501
Bug 1557501 - C-C part: Fix typo in rev ffde4bb2fe1b. r=me
mailnews/addrbook/src/nsDirPrefs.cpp
--- a/mailnews/addrbook/src/nsDirPrefs.cpp
+++ b/mailnews/addrbook/src/nsDirPrefs.cpp
@@ -676,34 +676,33 @@ static nsresult dir_GetChildList(const n
     // But we want the prefbranch of the servername, so
     // terminate the string at the first '.' after our branchname.
     int32_t dotPos = child.FindChar('.', branchLen);
     if (dotPos != kNotFound) {
       child.Truncate(dotPos);
     }
   }
 
-  if (aChildList.Length() < 1) {
+  if (aChildList.Length() > 1) {
     // sort the list, in preparation for duplicate entry removal
     PrefArrayMemberComparator comparator(branchLen);
     aChildList.Sort(comparator);
 
     // traverse the list and remove duplicate entries.
     // we use two positions in the list; the current entry and the next
     // entry; and perform a bunch of in-place moves. so |cur| points
     // to the last unique entry, and |next| points to some (possibly much
     // later) entry to test, at any given point. we know we have >= 2
     // elements in the list here, so we just init the two counters sensibly
     // to begin with.
     uint32_t cur = 0;
     for (uint32_t next = 1; next < aChildList.Length(); ++next) {
       // check if the elements are equal or unique
       if (comparator.Equals(aChildList[cur], aChildList[next])) {
-        // equal - just increment the next element ptr
-
+        ;  // equal - just increment the next element ptr
       } else {
         // cur & next are unique, so we need to shift the element.
         // ++cur will point to the next free location in the
         // reduced array (it's okay if that's == next)
         aChildList[++cur] = aChildList[next];
       }
     }