summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2019-05-10 15:03:59 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2019-05-10 15:03:59 +0000
commitce8b34ccb9ac9298d85f822ac75cd4c982ffffa6 (patch)
tree4d2cd391f003af7cae1858db3d788125fd00b9bc
parente7510fcc8f1bcaeaecf2acd2d7d95961b92dd50b (diff)
Fix dhcpd build on gcc architectures.
OK deraadt@ jca@
-rw-r--r--usr.sbin/dhcpd/confpars.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/dhcpd/confpars.c b/usr.sbin/dhcpd/confpars.c
index 4c1d986d174..89ccbe8e9a9 100644
--- a/usr.sbin/dhcpd/confpars.c
+++ b/usr.sbin/dhcpd/confpars.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: confpars.c,v 1.34 2019/05/08 22:00:55 krw Exp $ */
+/* $OpenBSD: confpars.c,v 1.35 2019/05/10 15:03:58 visa Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
@@ -1491,7 +1491,9 @@ push_domain_list(char ***domains, size_t *count, char *domain)
static void
free_domain_list(char **domains, size_t count)
{
- for (size_t i = 0; i < count; i++)
+ size_t i;
+
+ for (i = 0; i < count; i++)
free(domains[i]);
free(domains);
}
@@ -1504,7 +1506,7 @@ parse_domain_and_comp(FILE *cfile)
char *val, *domain;
unsigned char *buf = NULL;
unsigned char **bufptrs = NULL;
- size_t bufsiz = 0, bufn = 0, count = 0;
+ size_t bufsiz = 0, bufn = 0, count = 0, i;
int token = ';';
do {
@@ -1543,7 +1545,7 @@ parse_domain_and_comp(FILE *cfile)
/* dn_comp takes an int for the output buffer size */
if (!(bufsiz <= INT_MAX))
fatalx("Size of compressed domain buffer too large");
- for (size_t i = 0; i < count; i++) {
+ for (i = 0; i < count; i++) {
int n;
/* see bufsiz <= INT_MAX assertion, above */