From: kn Date: Wed, 23 Nov 2022 23:06:16 +0000 (+0000) Subject: Fix sparc64 build/run X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ff16d1dc951c21ceabf600e499eeb5d4344e81b7;p=openbsd Fix sparc64 build/run constraints.c:269: warning: ISO C90 forbids mixed declarations and code from tb --- diff --git a/regress/lib/libcrypto/x509/constraints.c b/regress/lib/libcrypto/x509/constraints.c index 933c4f47c84..d3fdf0e52b0 100644 --- a/regress/lib/libcrypto/x509/constraints.c +++ b/regress/lib/libcrypto/x509/constraints.c @@ -1,4 +1,4 @@ -/* $OpenBSD: constraints.c,v 1.13 2022/11/11 12:02:34 beck Exp $ */ +/* $OpenBSD: constraints.c,v 1.14 2022/11/23 23:06:16 kn Exp $ */ /* * Copyright (c) 2020 Bob Beck * @@ -254,9 +254,9 @@ test_invalid_hostnames(void) { int i, failure = 0; char *nulhost = "www.openbsd.org\0"; + CBS cbs; for (i = 0; invalid_hostnames[i] != NULL; i++) { - CBS cbs; CBS_init(&cbs, invalid_hostnames[i], strlen(invalid_hostnames[i])); if (x509_constraints_valid_host(&cbs)) { @@ -266,7 +266,6 @@ test_invalid_hostnames(void) goto done; } } - CBS cbs; CBS_init(&cbs, nulhost, strlen(nulhost) + 1); if (x509_constraints_valid_host(&cbs)) { FAIL("hostname with NUL byte accepted\n");