]> granicus.if.org Git - postgresql/commitdiff
TestConfiguration returns int, not bool. This mistake is relatively
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 31 Mar 2003 20:32:50 +0000 (20:32 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 31 Mar 2003 20:32:50 +0000 (20:32 +0000)
harmless on signed-char machines but would lead to core dump in the
deadlock detection code if char is unsigned.  Amazingly, this bug has
been here since 7.1 and yet wasn't reported till now.  Thanks to Robert
Bruccoleri for providing the opportunity to track it down.

src/backend/storage/lmgr/deadlock.c

index 8aeef9c36d6be744889a32b9074c553f3aa9d8a6..4c25f2ce6dfb17b7053b9614abc30293cfa5d7bf 100644 (file)
@@ -12,7 +12,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.15 2002/11/01 00:40:23 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.15.2.1 2003/03/31 20:32:50 tgl Exp $
  *
  *     Interface:
  *
@@ -47,7 +47,7 @@ typedef struct
 
 
 static bool DeadLockCheckRecurse(PGPROC *proc);
-static bool TestConfiguration(PGPROC *startProc);
+static int     TestConfiguration(PGPROC *startProc);
 static bool FindLockCycle(PGPROC *checkProc,
                          EDGE *softEdges, int *nSoftEdges);
 static bool FindLockCycleRecurse(PGPROC *checkProc,
@@ -301,7 +301,7 @@ DeadLockCheckRecurse(PGPROC *proc)
  * number of soft edges.
  *--------------------
  */
-static bool
+static int
 TestConfiguration(PGPROC *startProc)
 {
        int                     softFound = 0;