aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/error/elog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/error/elog.c')
-rw-r--r--src/backend/utils/error/elog.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 9c7489a9bb2..a2c8680fd0e 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -715,13 +715,13 @@ errcode_for_socket_access(void)
for (;;) \
{ \
va_list args; \
- bool success; \
+ int needed; \
va_start(args, fmt); \
- success = appendStringInfoVA(&buf, fmtbuf, args); \
+ needed = appendStringInfoVA(&buf, fmtbuf, args); \
va_end(args); \
- if (success) \
+ if (needed == 0) \
break; \
- enlargeStringInfo(&buf, buf.maxlen); \
+ enlargeStringInfo(&buf, needed); \
} \
/* Done with expanded fmt */ \
pfree(fmtbuf); \
@@ -758,13 +758,13 @@ errcode_for_socket_access(void)
for (;;) \
{ \
va_list args; \
- bool success; \
+ int needed; \
va_start(args, n); \
- success = appendStringInfoVA(&buf, fmtbuf, args); \
+ needed = appendStringInfoVA(&buf, fmtbuf, args); \
va_end(args); \
- if (success) \
+ if (needed == 0) \
break; \
- enlargeStringInfo(&buf, buf.maxlen); \
+ enlargeStringInfo(&buf, needed); \
} \
/* Done with expanded fmt */ \
pfree(fmtbuf); \