From 90d76525c5cc2f3f4781351a1d99be839dfa2874 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Sat, 3 Mar 2007 19:32:55 +0000 Subject: Add resetStringInfo(), which clears the content of a StringInfo, and fixup various places in the tree that were clearing a StringInfo by hand. Making this function a part of the API simplifies client code slightly, and avoids needlessly peeking inside the StringInfo interface. --- src/backend/storage/lmgr/deadlock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/backend/storage') diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c index ddbadfa036..f2130083ee 100644 --- a/src/backend/storage/lmgr/deadlock.c +++ b/src/backend/storage/lmgr/deadlock.c @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/lmgr/deadlock.c,v 1.45 2007/03/03 18:46:40 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/lmgr/deadlock.c,v 1.46 2007/03/03 19:32:54 neilc Exp $ * * Interface: * @@ -933,8 +933,7 @@ DeadLockReport(void) appendStringInfoChar(&buf, '\n'); /* reset buf2 to hold next object description */ - buf2.len = 0; - buf2.data[0] = '\0'; + resetStringInfo(&buf2); DescribeLockTag(&buf2, &info->locktag); -- cgit v1.2.1