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

Commite9fcfed

Browse files
committed
Fix portability failure introduced in commitsd2b0b60 et al.
I made a frontend fprintf() format use %m, forgetting that that's onlysafe in HEAD not the back branches; prior to96bf88d andd6c55de,it would work on glibc platforms but not elsewhere. Revert to using%s ... strerror(errno) as the code did before.We could have left HEAD as-is, but for code consistency across branches,I chose to apply this patch there too.Per Coverity and a few buildfarm members.
1 parentf89ae34 commite9fcfed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/common/psprintf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ pvsnprintf(char *buf, size_t len, const char *fmt, va_list args)
115115
#ifndefFRONTEND
116116
elog(ERROR,"vsnprintf failed: %m with format string \"%s\"",fmt);
117117
#else
118-
fprintf(stderr,"vsnprintf failed: %m with format string \"%s\"\n",fmt);
118+
fprintf(stderr,"vsnprintf failed: %s with format string \"%s\"\n",
119+
strerror(errno),fmt);
119120
exit(EXIT_FAILURE);
120121
#endif
121122
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp