aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
Diffstat (limited to 'ares')
-rw-r--r--ares/ares_strerror.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ares/ares_strerror.c b/ares/ares_strerror.c
index 3486ebfbb..ce2edb192 100644
--- a/ares/ares_strerror.c
+++ b/ares/ares_strerror.c
@@ -46,6 +46,8 @@ const char *ares_strerror(int code)
"Illegal hints flags specified"
};
- DEBUGASSERT(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)));
- return errtext[code];
+ if(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)))
+ return errtext[code];
+ else
+ return "unknown";
}