MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / __redisSetErrorFromErrno

Function __redisSetErrorFromErrno

deps/hiredis/net.c:95–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95static void __redisSetErrorFromErrno(redisContext *c, int type, const char *prefix) {
96 int errorno = errno; /* snprintf() may change errno */
97 char buf[128] = { 0 };
98 size_t len = 0;
99
100 if (prefix != NULL)
101 len = snprintf(buf,sizeof(buf),"%s: ",prefix);
102 strerror_r(errorno, (char *)(buf + len), sizeof(buf) - len);
103 __redisSetError(c,type,buf);
104}
105
106static int redisSetReuseAddr(redisContext *c) {
107 int on = 1;

Callers 7

redisSetReuseAddrFunction · 0.85
redisCreateSocketFunction · 0.85
redisSetBlockingFunction · 0.85
redisSetTcpNoDelayFunction · 0.85
redisContextWaitReadyFunction · 0.85
redisCheckSocketErrorFunction · 0.85
redisContextSetTimeoutFunction · 0.85

Calls 1

__redisSetErrorFunction · 0.85

Tested by

no test coverage detected