chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: convert log_unit_*() to log_unit_*_errno()
[elogind.git]
/
src
/
resolve
/
dns-type.c
diff --git
a/src/resolve/dns-type.c
b/src/resolve/dns-type.c
index 271a7e176bf9120faaafd6929dba67d24fdf8f43..a3e740896f762a3969930701ed88012c9c85ba05 100644
(file)
--- 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"
#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);
const struct dns_type_name *sc;
assert(s);
- assert(type);
sc = lookup_dns_type(s, strlen(s));
if (!sc)
sc = lookup_dns_type(s, strlen(s));
if (!sc)
- return
-EINVAL
;
+ return
_DNS_TYPE_INVALID
;
- *type = sc->id;
- return 0;
+ return sc->id;
}
}