]> granicus.if.org Git - postgresql/commitdiff
Prevent use of uninitialized variable
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 2 Apr 2019 19:03:26 +0000 (16:03 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 2 Apr 2019 19:03:26 +0000 (16:03 -0300)
Per buildfarm member longfin.

src/backend/storage/lmgr/lmgr.c

index 0b04b0937827cafb557b62effc34aee607d939bf..106d227a5acd51ff2087a35de78b24a81c1b5ab1 100644 (file)
@@ -880,7 +880,8 @@ WaitForLockersMultiple(List *locktags, LOCKMODE lockmode, bool progress)
                holders = lappend(holders,
                                                  GetLockConflicts(locktag, lockmode,
                                                                                   progress ? &count : NULL));
-               total += count;
+               if (progress)
+                       total += count;
        }
 
        if (progress)