Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8386c81

Browse files
committed
Reverse out addition of snprintf.
1 parent 9979660 commit 8386c81

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/backend/utils/misc/trace.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ tprintf(int flag, const char *fmt,...)
108108
#ifdef ELOG_TIMESTAMPS
109109
strcpy(line, tprintf_timestamp());
110110
#endif
111-
vsnprintf(line + TIMESTAMP_SIZE, ELOG_MAXLEN,
112-
fmt, ap);
111+
vsprintf(line + TIMESTAMP_SIZE, fmt, ap);
113112
va_end(ap);
114113

115114
#ifdef USE_SYSLOG
@@ -139,8 +138,7 @@ tprintf1(const char *fmt, ... )
139138
#ifdef ELOG_TIMESTAMPS
140139
strcpy(line, tprintf_timestamp());
141140
#endif
142-
vsnprintf(line+TIMESTAMP_SIZE, ELOG_MAXLEN,
143-
fmt, ap);
141+
vsprintf(line+TIMESTAMP_SIZE, fmt, ap);
144142
va_end(ap);
145143

146144
#ifdef USE_SYSLOG
@@ -168,8 +166,7 @@ eprintf(const char *fmt,...)
168166
#ifdef ELOG_TIMESTAMPS
169167
strcpy(line, tprintf_timestamp());
170168
#endif
171-
vsnprintf(line + TIMESTAMP_SIZE, ELOG_MAXLEN,
172-
fmt, ap);
169+
vsprintf(line + TIMESTAMP_SIZE, fmt, ap);
173170
va_end(ap);
174171

175172
#ifdef USE_SYSLOG
@@ -347,8 +344,7 @@ read_pg_options(SIGNAL_ARGS)
347344
return;
348345
}
349346

350-
snprintf(buffer, BUF_SIZE - 1,
351-
"%s/%s", DataDir, "pg_options");
347+
sprintf(buffer, "%s/%s", DataDir, "pg_options");
352348
if ((fd = open(buffer, O_RDONLY)) < 0)
353349
return;
354350

0 commit comments

Comments
 (0)