diff options
author | Bruce Momjian <bruce@momjian.us> | 2000-04-12 17:17:23 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2000-04-12 17:17:23 +0000 |
commit | 52f77df613cea1803ce86321c37229626d9f213c (patch) | |
tree | bd9ac9f667f295cb65f4c448a5bb5a062d656b27 /src/backend/lib/stringinfo.c | |
parent | db4518729d85da83eafdacbcebaeb12618517595 (diff) | |
download | postgresql-52f77df613cea1803ce86321c37229626d9f213c.tar.gz postgresql-52f77df613cea1803ce86321c37229626d9f213c.zip |
Ye-old pgindent run. Same 4-space tabs.
Diffstat (limited to 'src/backend/lib/stringinfo.c')
-rw-r--r-- | src/backend/lib/stringinfo.c | 11 |
1 files changed, 6 insertions, 5 deletions
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; |