aboutsummaryrefslogtreecommitdiff
path: root/src/common/psprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/psprintf.c')
-rw-r--r--src/common/psprintf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/psprintf.c b/src/common/psprintf.c
index b01e1953609..e1320a6db0b 100644
--- a/src/common/psprintf.c
+++ b/src/common/psprintf.c
@@ -34,7 +34,7 @@
* psprintf
*
* Format text data under the control of fmt (an sprintf-style format string)
- * and return it in an allocated-on-demand buffer. The buffer is allocated
+ * and return it in an allocated-on-demand buffer. The buffer is allocated
* with palloc in the backend, or malloc in frontend builds. Caller is
* responsible to free the buffer when no longer needed, if appropriate.
*
@@ -54,7 +54,7 @@ psprintf(const char *fmt,...)
size_t newlen;
/*
- * Allocate result buffer. Note that in frontend this maps to malloc
+ * Allocate result buffer. Note that in frontend this maps to malloc
* with exit-on-error.
*/
result = (char *) palloc(len);
@@ -152,13 +152,14 @@ pvsnprintf(char *buf, size_t len, const char *fmt, va_list args)
{
/*
* This appears to be a C99-compliant vsnprintf, so believe its
- * estimate of the required space. (If it's wrong, the logic will
+ * estimate of the required space. (If it's wrong, the logic will
* still work, but we may loop multiple times.) Note that the space
* needed should be only nprinted+1 bytes, but we'd better allocate
* one more than that so that the test above will succeed next time.
*
* In the corner case where the required space just barely overflows,
- * fall through so that we'll error out below (possibly after looping).
+ * fall through so that we'll error out below (possibly after
+ * looping).
*/
if ((size_t) nprinted <= MaxAllocSize - 2)
return nprinted + 2;