]> granicus.if.org Git - postgresql/commitdiff
Remove bogus while-loop.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 28 Feb 2014 11:22:25 +0000 (13:22 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 28 Feb 2014 11:33:04 +0000 (13:33 +0200)
Commit abf5c5c9a4f142b3343614746bb9e99a794f8e7b added a bogus while-
statement after the for(;;)-loop. It went unnoticed in testing, because
it was dead code.

Report by KONDO Mitsumasa. Backpatch to 9.3. The commit that introduced
this was also applied to 9.2, but not the bogus while-loop part, because
the code in 9.2 looks quite different.

src/backend/access/transam/xlog.c

index d57bf50e0b448163b5bd7223920d50148c185a37..7399fd45c819f198ebec057908065f62ee7c1eea 100644 (file)
@@ -9906,9 +9906,9 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
                 * process.
                 */
                HandleStartupProcInterrupts();
-       } while (StandbyMode);
+       }
 
-       return false;
+       return false;   /* not reached */
 }
 
 /*