diff options
Diffstat (limited to 'src/backend/lib')
-rw-r--r-- | src/backend/lib/dllist.c | 11 | ||||
-rw-r--r-- | src/backend/lib/stringinfo.c | 11 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/backend/lib/dllist.c b/src/backend/lib/dllist.c index 41663b40c1d..5711f70b690 100644 --- a/src/backend/lib/dllist.c +++ b/src/backend/lib/dllist.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.16 2000/01/26 05:56:26 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.17 2000/04/12 17:15:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -128,14 +128,16 @@ DLRemove(Dlelem *e) if (e->dle_prev) e->dle_prev->dle_next = e->dle_next; - else /* must be the head element */ + else +/* must be the head element */ { Assert(e == l->dll_head); l->dll_head = e->dle_next; } if (e->dle_next) e->dle_next->dle_prev = e->dle_prev; - else /* must be the tail element */ + else +/* must be the tail element */ { Assert(e == l->dll_tail); l->dll_tail = e->dle_prev; @@ -236,7 +238,8 @@ DLMoveToFront(Dlelem *e) if (e->dle_next) e->dle_next->dle_prev = e->dle_prev; - else /* must be the tail element */ + else +/* must be the tail element */ { Assert(e == l->dll_tail); l->dll_tail = e->dle_prev; diff --git a/src/backend/lib/stringinfo.c b/src/backend/lib/stringinfo.c index 9bfa42554ae..4f2df746843 100644 --- a/src/backend/lib/stringinfo.c +++ b/src/backend/lib/stringinfo.c @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: stringinfo.c,v 1.24 2000/01/26 05:56:26 momjian Exp $ + * $Id: stringinfo.c,v 1.25 2000/04/12 17:15:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -85,7 +85,7 @@ enlargeStringInfo(StringInfo str, int needed) str->data = (char *) repalloc(str->data, newlen); if (str->data == NULL) elog(ERROR, - "enlargeStringInfo: Out of memory (%d bytes requested)", newlen); + "enlargeStringInfo: Out of memory (%d bytes requested)", newlen); str->maxlen = newlen; } @@ -122,12 +122,13 @@ appendStringInfo(StringInfo str, const char *fmt,...) nprinted = vsnprintf(str->data + str->len, avail, fmt, args); va_end(args); + /* * Note: some versions of vsnprintf return the number of chars - * actually stored, but at least one returns -1 on failure. - * Be conservative about believing whether the print worked. + * actually stored, but at least one returns -1 on failure. Be + * conservative about believing whether the print worked. */ - if (nprinted >= 0 && nprinted < avail-1) + if (nprinted >= 0 && nprinted < avail - 1) { /* Success. Note nprinted does not include trailing null. */ str->len += nprinted; |