summaryrefslogtreecommitdiff
path: root/src/clients/s6-randomip.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-01-12 15:35:29 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-01-12 15:35:29 +0000
commit3f9536c5cc9ed6659ad2514859bd1716cbf7b26b (patch)
tree3f01ca46f59b9458c93ace3f07127d1e2bb460e8 /src/clients/s6-randomip.c
parent3a289d1ca8dd2bce4a8bb6549709ea62262ec786 (diff)
downloads6-dns-3f9536c5cc9ed6659ad2514859bd1716cbf7b26b.tar.xz
Types fix, first pass.
Some places marked XXX for the skalibs API change.
Diffstat (limited to 'src/clients/s6-randomip.c')
-rw-r--r--src/clients/s6-randomip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/clients/s6-randomip.c b/src/clients/s6-randomip.c
index 2c1581a..95ce042 100644
--- a/src/clients/s6-randomip.c
+++ b/src/clients/s6-randomip.c
@@ -1,5 +1,6 @@
/* ISC license. */
+#include <sys/types.h>
#include <errno.h>
#include <skalibs/uint.h>
#include <skalibs/sgetopt.h>
@@ -17,7 +18,7 @@ int main (int argc, char const *const *argv)
char ip[16] ;
unsigned int n ;
unsigned int i = 0 ;
- unsigned int what = 0 ;
+ size_t what = 0 ;
int finite = 0 ;
PROG = "s6-randomip" ;
for (;;)
@@ -41,7 +42,7 @@ int main (int argc, char const *const *argv)
if (!random_init()) strerr_diefu1sys(111, "init random generator") ;
for (i = 0 ; !finite || (i < n) ; i++)
{
- unsigned int len = what ;
+ size_t len = what ;
if (len > 16)
{
unsigned char c = random_char() ;