summaryrefslogtreecommitdiff
path: root/src/resolve/dns-type.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/dns-type.c')
-rw-r--r--src/resolve/dns-type.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/resolve/dns-type.c b/src/resolve/dns-type.c
index 271a7e176b..a3e740896f 100644
--- a/src/resolve/dns-type.c
+++ b/src/resolve/dns-type.c
@@ -32,16 +32,14 @@ lookup_dns_type (register const char *str, register unsigned int len);
#include "dns_type-from-name.h"
#include "dns_type-to-name.h"
-int dns_type_from_string(const char *s, uint16_t *type) {
+int dns_type_from_string(const char *s) {
const struct dns_type_name *sc;
assert(s);
- assert(type);
sc = lookup_dns_type(s, strlen(s));
if (!sc)
- return -EINVAL;
+ return _DNS_TYPE_INVALID;
- *type = sc->id;
- return 0;
+ return sc->id;
}