summaryrefslogtreecommitdiff
path: root/src/clock/s6-taiclockd.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 19:39:01 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 19:39:01 +0000
commit53091e3bce487ee82e2805a0231e780551561717 (patch)
treef0fa36ff8eadaf1f01d4510597b5e3a310764dc7 /src/clock/s6-taiclockd.c
parentf85b8a70f3b44510a5cf3895bf7357ae90655f65 (diff)
downloads6-networking-53091e3bce487ee82e2805a0231e780551561717.tar.xz
Adapt to skalibs-2.5.0.0
Diffstat (limited to 'src/clock/s6-taiclockd.c')
-rw-r--r--src/clock/s6-taiclockd.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/clock/s6-taiclockd.c b/src/clock/s6-taiclockd.c
index 0477ec5..504c4fc 100644
--- a/src/clock/s6-taiclockd.c
+++ b/src/clock/s6-taiclockd.c
@@ -1,12 +1,10 @@
/* ISC license. */
-#include <sys/types.h>
+#include <string.h>
#include <stdint.h>
-#include <skalibs/uint16.h>
-#include <skalibs/bytestr.h>
+#include <skalibs/types.h>
#include <skalibs/sgetopt.h>
#include <skalibs/strerr2.h>
-#include <skalibs/fmtscan.h>
#include <skalibs/djbunix.h>
#include <skalibs/socket.h>
#include <skalibs/tai.h>
@@ -24,7 +22,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-taiclockd" ;
for (;;)
{
- register int opt = subgetopt_r(argc, argv, "i:p:", &l) ;
+ int opt = subgetopt_r(argc, argv, "i:p:", &l) ;
if (opt == -1) break ;
switch (opt)
{
@@ -43,8 +41,8 @@ int main (int argc, char const *const *argv)
for (;;)
{
char packet[256] ;
- register ssize_t r = socket_recv46(s, packet, 256, &ip, &port) ;
- if ((r >= 20) && !byte_diff(packet, 4, "ctai"))
+ ssize_t r = socket_recv46(s, packet, 256, &ip, &port) ;
+ if ((r >= 20) && !memcmp(packet, "ctai", 4))
{
tain_t now ;
packet[0] = 's' ;