Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8386c81

Browse files
committed
Reverse out addition of snprintf.
1 parent9979660 commit8386c81

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

‎src/backend/utils/misc/trace.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ tprintf(int flag, const char *fmt,...)
108108
#ifdefELOG_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
#ifdefUSE_SYSLOG
@@ -139,8 +138,7 @@ tprintf1(const char *fmt, ... )
139138
#ifdefELOG_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
#ifdefUSE_SYSLOG
@@ -168,8 +166,7 @@ eprintf(const char *fmt,...)
168166
#ifdefELOG_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
#ifdefUSE_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)

[8]ページ先頭

©2009-2025 Movatter.jp