diff options
| author | kn <> | 2022-11-23 23:06:16 +0000 |
|---|---|---|
| committer | kn <> | 2022-11-23 23:06:16 +0000 |
| commit | 0b2b3492326d4a4d08cb76a92930d1c330c61418 (patch) | |
| tree | fe81d683b13df12c2623ab076aedecef082db245 /src | |
| parent | cedef16f4018c1cfd097580abf0f449b52db58a8 (diff) | |
| download | openbsd-0b2b3492326d4a4d08cb76a92930d1c330c61418.tar.gz openbsd-0b2b3492326d4a4d08cb76a92930d1c330c61418.tar.bz2 openbsd-0b2b3492326d4a4d08cb76a92930d1c330c61418.zip | |
Fix sparc64 build/run
constraints.c:269: warning: ISO C90 forbids mixed declarations and code
from tb
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/x509/constraints.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/x509/constraints.c b/src/regress/lib/libcrypto/x509/constraints.c index 933c4f47c8..d3fdf0e52b 100644 --- a/src/regress/lib/libcrypto/x509/constraints.c +++ b/src/regress/lib/libcrypto/x509/constraints.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: constraints.c,v 1.13 2022/11/11 12:02:34 beck Exp $ */ | 1 | /* $OpenBSD: constraints.c,v 1.14 2022/11/23 23:06:16 kn Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -254,9 +254,9 @@ test_invalid_hostnames(void) | |||
| 254 | { | 254 | { |
| 255 | int i, failure = 0; | 255 | int i, failure = 0; |
| 256 | char *nulhost = "www.openbsd.org\0"; | 256 | char *nulhost = "www.openbsd.org\0"; |
| 257 | CBS cbs; | ||
| 257 | 258 | ||
| 258 | for (i = 0; invalid_hostnames[i] != NULL; i++) { | 259 | for (i = 0; invalid_hostnames[i] != NULL; i++) { |
| 259 | CBS cbs; | ||
| 260 | CBS_init(&cbs, invalid_hostnames[i], | 260 | CBS_init(&cbs, invalid_hostnames[i], |
| 261 | strlen(invalid_hostnames[i])); | 261 | strlen(invalid_hostnames[i])); |
| 262 | if (x509_constraints_valid_host(&cbs)) { | 262 | if (x509_constraints_valid_host(&cbs)) { |
| @@ -266,7 +266,6 @@ test_invalid_hostnames(void) | |||
| 266 | goto done; | 266 | goto done; |
| 267 | } | 267 | } |
| 268 | } | 268 | } |
| 269 | CBS cbs; | ||
| 270 | CBS_init(&cbs, nulhost, strlen(nulhost) + 1); | 269 | CBS_init(&cbs, nulhost, strlen(nulhost) + 1); |
| 271 | if (x509_constraints_valid_host(&cbs)) { | 270 | if (x509_constraints_valid_host(&cbs)) { |
| 272 | FAIL("hostname with NUL byte accepted\n"); | 271 | FAIL("hostname with NUL byte accepted\n"); |
