summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2019-05-10 15:03:58 +0000
committervisa <visa@openbsd.org>2019-05-10 15:03:58 +0000
commit34bf9f2a4f0d1eb35fdc0474b892ab616810aa3f (patch)
tree5298307d10712ed2af913247604d6ef410e7bd92
parentInroduce malloc_conceal() and calloc_conceal(). Similar to their (diff)
downloadwireguard-openbsd-34bf9f2a4f0d1eb35fdc0474b892ab616810aa3f.tar.xz
wireguard-openbsd-34bf9f2a4f0d1eb35fdc0474b892ab616810aa3f.zip
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 */