summaryrefslogtreecommitdiff
path: root/src/clients/s6-randomip.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-11 16:09:55 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-11 16:09:55 +0000
commit5ad27a3dc4b957191e2e657d41656810138ba789 (patch)
tree07e7e00ab43b74d6a3fdff9ad80e93882921adfa /src/clients/s6-randomip.c
parentf417b72c9489cd7c20b94eb8904a8911b7f6fd15 (diff)
downloads6-dns-5ad27a3dc4b957191e2e657d41656810138ba789.tar.xz
Adapt to skalibs-2.5.0.0
Diffstat (limited to 'src/clients/s6-randomip.c')
-rw-r--r--src/clients/s6-randomip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clients/s6-randomip.c b/src/clients/s6-randomip.c
index 95ce042..7103443 100644
--- a/src/clients/s6-randomip.c
+++ b/src/clients/s6-randomip.c
@@ -2,7 +2,7 @@
#include <sys/types.h>
#include <errno.h>
-#include <skalibs/uint.h>
+#include <skalibs/types.h>
#include <skalibs/sgetopt.h>
#include <skalibs/strerr2.h>
#include <skalibs/buffer.h>
@@ -23,7 +23,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-randomip" ;
for (;;)
{
- register int opt = subgetopt(argc, argv, "46n:") ;
+ int opt = subgetopt(argc, argv, "46n:") ;
if (opt == -1) break ;
switch (opt)
{
@@ -51,7 +51,7 @@ int main (int argc, char const *const *argv)
random_string(ip, len) ;
len = (len == 16) ? ip6_fmt(fmt, ip) : ip4_fmt(fmt, ip) ;
fmt[len++] = '\n' ;
- if (buffer_put(buffer_1, fmt, len) < (int)len)
+ if (buffer_put(buffer_1, fmt, len) < (ssize_t)len)
strerr_diefu1sys(111, "write to stdout") ;
}
if (!buffer_flush(buffer_1))