summaryrefslogtreecommitdiff
path: root/src/libs6dns/s6dns_constants_error_str.c
blob: 6d477c2db0b78d40b0782457fbdc82cce915aab9 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* ISC license. */

#include <skalibs/error.h>
#include <s6-dns/s6dns-constants.h>

char const *s6dns_constants_error_str (int e)
{
  s6dns_constants_error_message_t const *p = s6dns_constants_error ;
  while ((p->num != e) && (p->num != -1)) p++ ;
  return p->num == -1 ? error_str(e) : p->string ;
}