Skip to content

Commit b2a1703

Browse files
committed
Have strerror_r return "Unknown error".
1 parent a63d216 commit b2a1703

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/port/thread.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
99
*
10-
* $PostgreSQL: pgsql/src/port/thread.c,v 1.21 2004/06/07 22:39:45 momjian Exp $
10+
* $PostgreSQL: pgsql/src/port/thread.c,v 1.22 2004/06/08 01:45:50 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -75,7 +75,7 @@ pqStrerror(int errnum, char *strerrbuf, size_t buflen)
7575
if (strerror_r(errnum, strerrbuf, buflen) == 0)
7676
return strerrbuf;
7777
else
78-
return NULL;
78+
return "Unknown error";
7979
#else
8080
/* GNU libc */
8181
return strerror_r(errnum, strerrbuf, buflen);
@@ -109,7 +109,6 @@ pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
109109
*/
110110
*result = getpwuid_r(uid, resultbuf, buffer, buflen);
111111
#endif
112-
113112
#else
114113

115114
/* no getpwuid_r() available, just use getpwuid() */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy