MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / strerror

Function strerror

replace/strerror.c:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22extern const char * sys_err[];
23extern int sys_nerr;
24char *
25strerror(int errnum)
26{
27 static char whaterr[32];
28
29 if (errnum < 0) {
30 return "negative errno";
31 }
32 if (errnum >= sys_nerr) {
33 snprintf(whaterr, sizeof(whaterr),"error %d", errnum);
34 return whaterr;
35 }
36 return sys_err[sys_nerr];
37}

Callers 6

mainFunction · 0.85
setup_inputFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
pcmk_strerrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected