summaryrefslogtreecommitdiff
path: root/src/libs6dns
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6dns')
-rw-r--r--src/libs6dns/s6dns_debug_dumpdt_pre_send.c4
-rw-r--r--src/libs6dns/s6dns_engine.c2
-rw-r--r--src/libs6dns/s6dns_message_get_string.c2
-rw-r--r--src/libs6dns/s6dns_rci_init.c2
-rw-r--r--src/libs6dns/s6dns_resolven_loop.c6
5 files changed, 8 insertions, 8 deletions
diff --git a/src/libs6dns/s6dns_debug_dumpdt_pre_send.c b/src/libs6dns/s6dns_debug_dumpdt_pre_send.c
index 5e1c60a..6d42608 100644
--- a/src/libs6dns/s6dns_debug_dumpdt_pre_send.c
+++ b/src/libs6dns/s6dns_debug_dumpdt_pre_send.c
@@ -5,7 +5,7 @@
#define _BSD_SOURCE
#endif
-#include <sys/types.h>
+#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <skalibs/types.h>
@@ -45,7 +45,7 @@ int s6dns_debug_dumpdt_pre_send (s6dns_engine_t const *dt, void *data)
if (!localtmn_from_tain(&l, &dt->localdeadline, 0))
{
if (errno != EOVERFLOW) return 0 ;
- byte_copy(buf, 10, "\"infinite\"") ; len = 10 ;
+ memcpy(buf, "\"infinite\"", 10) ; len = 10 ;
}
else len = localtmn_fmt(buf, &l) ;
}
diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c
index baf93b0..8891e8e 100644
--- a/src/libs6dns/s6dns_engine.c
+++ b/src/libs6dns/s6dns_engine.c
@@ -381,7 +381,7 @@ int s6dns_engine_init_r (s6dns_engine_t *dt, s6dns_ip46list_t const *servers, ui
h.counts.qd = 1 ;
uint16_pack_big(dt->sa.s, qlen + 16) ;
s6dns_message_header_pack(dt->sa.s + 2, &h) ;
- byte_copy(dt->sa.s + 14, qlen, q) ;
+ memcpy(dt->sa.s + 14, q, qlen) ;
uint16_pack_big(dt->sa.s + 14 + qlen, qtype) ;
uint16_pack_big(dt->sa.s + 16 + qlen, S6DNS_C_IN) ;
if (qlen > 496) dt->flagtcp = 1 ;
diff --git a/src/libs6dns/s6dns_message_get_string.c b/src/libs6dns/s6dns_message_get_string.c
index 706da39..e00f071 100644
--- a/src/libs6dns/s6dns_message_get_string.c
+++ b/src/libs6dns/s6dns_message_get_string.c
@@ -6,7 +6,7 @@
int s6dns_message_get_string (s6dns_domain_t *d, char const *packet, unsigned int packetlen, unsigned int *pos)
{
- register int r = s6dns_message_get_string_internal(d->s, 255, packet, packetlen, pos) ;
+ int r = s6dns_message_get_string_internal(d->s, 255, packet, packetlen, pos) ;
if (r < 0) return 0 ;
d->len = r ;
return 1 ;
diff --git a/src/libs6dns/s6dns_rci_init.c b/src/libs6dns/s6dns_rci_init.c
index 4c51679..446e211 100644
--- a/src/libs6dns/s6dns_rci_init.c
+++ b/src/libs6dns/s6dns_rci_init.c
@@ -82,7 +82,7 @@ static inline int stringrules (stralloc *rules, char const *s, unsigned int *num
while (c)
{
c = *s++ ;
- if (memchr(" \t\n\r", 5, c))
+ if (memchr(" \t\n\r", c, 5))
{
if (!crunching)
{
diff --git a/src/libs6dns/s6dns_resolven_loop.c b/src/libs6dns/s6dns_resolven_loop.c
index 9fefbb6..23b1c36 100644
--- a/src/libs6dns/s6dns_resolven_loop.c
+++ b/src/libs6dns/s6dns_resolven_loop.c
@@ -18,9 +18,9 @@ int s6dns_resolven_loop (s6dns_engine_t *dt, unsigned int n, unsigned int or, ta
for (;;)
{
tain_t localdeadline = *deadline ;
- register int r ;
- register unsigned int i = 0 ;
- register unsigned int j = 0 ;
+ int r ;
+ unsigned int i = 0 ;
+ unsigned int j = 0 ;
for (; i < n ; i++) if (dt[i].status == EAGAIN)
{
s6dns_engine_nextdeadline(dt + i, &localdeadline) ;