Content-Length: 262099 | pFad | http://github.com/postgrespro/postgres_cluster/commit/e9fcfed3fb6b15e6b33bea9bb8504b14560857a8

41 Fix portability failure introduced in commits d2b0b60e7 et al. · postgrespro/postgres_cluster@e9fcfed · GitHub
Skip to content

Commit e9fcfed

Browse files
committed
Fix portability failure introduced in commits d2b0b60 et al.
I made a frontend fprintf() format use %m, forgetting that that's only safe in HEAD not the back branches; prior to 96bf88d and d6c55de, 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 parent f89ae34 commit e9fcfed

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
#ifndef FRONTEND
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/e9fcfed3fb6b15e6b33bea9bb8504b14560857a8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy