From: Tom Lane Date: Mon, 4 May 2009 02:46:36 +0000 (+0000) Subject: Fix missed usage of DLNewElem() X-Git-Url: http://git.postgresql.org/gitweb/backend_dirs.html?a=commitdiff_plain;h=270d15e0de06dc35502ba64a2fba9cd6c41452df;p=users%2Fsimon%2Fpostgres.git Fix missed usage of DLNewElem() --- diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index c20c7d482f..51950c034b 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -143,7 +143,7 @@ typedef struct bkend long cancel_key; /* cancel key for cancels for this backend */ bool is_autovacuum; /* is it an autovacuum process? */ bool dead_end; /* is it going to send an error and quit? */ - Dlelem elem; /* self pointer into BackendList */ + Dlelem elem; /* list link in BackendList */ } Backend; static Dllist *BackendList; @@ -4288,7 +4288,8 @@ StartAutovacuumWorker(void) bn->cancel_key = MyCancelKey; bn->is_autovacuum = true; bn->dead_end = false; - DLAddHead(BackendList, DLNewElem(bn)); + DLInitElem(&bn->elem, bn); + DLAddHead(BackendList, &bn->elem); #ifdef EXEC_BACKEND ShmemBackendArrayAdd(bn); #endif