mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
pgindent run for 9.4
This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user