summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ab99e2d)
For the CSYSERR applications should check errno themselves
const char *cs_errmsg(int n)
{
const char *cs_errmsg(int n)
{
- static char buf[250];
-
- if (n < CSNONE || n > CSLASTERROR) {
- sprintf(buf, "unknown comstack error %d", n);
- return buf;
- }
- if (n == CSYSERR) {
- sprintf(buf, "%s: %s", cs_errlist[n], strerror(errno));
- return buf;
- }
+ if (n < CSNONE || n > CSLASTERROR)
+ n = CSNONE;