summaryrefslogtreecommitdiff
path: root/src/libs6dns/s6dns_analyze_record.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6dns/s6dns_analyze_record.c')
-rw-r--r--src/libs6dns/s6dns_analyze_record.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libs6dns/s6dns_analyze_record.c b/src/libs6dns/s6dns_analyze_record.c
index ecc5c26..e2621f7 100644
--- a/src/libs6dns/s6dns_analyze_record.c
+++ b/src/libs6dns/s6dns_analyze_record.c
@@ -1,9 +1,8 @@
/* ISC license. */
+#include <string.h>
#include <stdint.h>
-#include <skalibs/uint16.h>
-#include <skalibs/uint32.h>
-#include <skalibs/bytestr.h>
+#include <skalibs/types.h>
#include <skalibs/genwrite.h>
#include <s6-dns/s6dns-domain.h>
#include <s6-dns/s6dns-message.h>
@@ -11,7 +10,7 @@
static s6dns_analyze_rtypetable_t const *rtypelookup (uint16_t rtype)
{
- register s6dns_analyze_rtypetable_t const *wut = s6dns_analyze_rtypetable ;
+ s6dns_analyze_rtypetable_t const *wut = s6dns_analyze_rtypetable ;
while (wut->rtype && wut->rtype != rtype) wut++ ;
return wut ;
}
@@ -21,7 +20,7 @@ int s6dns_analyze_record (genwrite_t *gp, s6dns_message_rr_t const *rr, char con
s6dns_analyze_rtypetable_t const *wut = rtypelookup(rr->rtype) ;
{
char buf[256] ;
- register unsigned int n = s6dns_domain_tostring(buf, 256, &rr->name) ;
+ unsigned int n = s6dns_domain_tostring(buf, 256, &rr->name) ;
if (!n) return 0 ;
if ((*gp->put)(gp->target, buf, n) < 0) return 0 ;
}
@@ -30,7 +29,7 @@ int s6dns_analyze_record (genwrite_t *gp, s6dns_message_rr_t const *rr, char con
if ((*gp->put)(gp->target, fmt, 1 + uint32_fmt(fmt+1, rr->ttl)) < 0) return 0 ;
}
if ((*gp->put)(gp->target, " ", 1) < 0) return 0 ;
- if ((*gp->put)(gp->target, wut->string, str_len(wut->string)) < 0) return 0 ;
+ if ((*gp->put)(gp->target, wut->string, strlen(wut->string)) < 0) return 0 ;
if ((*gp->put)(gp->target, " ", 1) < 0) return 0 ;
if (!(*wut->f)(gp, rr, packet, packetlen, pos)) return 0 ;
if ((*gp->put)(gp->target, "\n", 1) < 0) return 0 ;