diff options
| author | tb <> | 2025-08-15 21:47:39 +0000 |
|---|---|---|
| committer | tb <> | 2025-08-15 21:47:39 +0000 |
| commit | 13656f0db6ccf444b794aea868c6e5bdfc241a24 (patch) | |
| tree | 0b84a38874004bf75c08e52777b9747231a87b22 /src | |
| parent | eefcba80b2dbea3302f9a6b70fbf0e57be4d0fc0 (diff) | |
| download | openbsd-13656f0db6ccf444b794aea868c6e5bdfc241a24.tar.gz openbsd-13656f0db6ccf444b794aea868c6e5bdfc241a24.tar.bz2 openbsd-13656f0db6ccf444b794aea868c6e5bdfc241a24.zip | |
mlkem_tests: remove unneded ret variable from mlkem_{decap,keygen}_tests()
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/mlkem/mlkem_tests.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/src/regress/lib/libcrypto/mlkem/mlkem_tests.c b/src/regress/lib/libcrypto/mlkem/mlkem_tests.c index 556da614c2..361467afd0 100644 --- a/src/regress/lib/libcrypto/mlkem/mlkem_tests.c +++ b/src/regress/lib/libcrypto/mlkem/mlkem_tests.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: mlkem_tests.c,v 1.9 2025/08/15 14:45:33 tb Exp $ */ | 1 | /* $OpenBSD: mlkem_tests.c,v 1.10 2025/08/15 21:47:39 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Google Inc. | 3 | * Copyright (c) 2024 Google Inc. |
| 4 | * Copyright (c) 2024 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2024 Theo Buehler <tb@openbsd.org> |
| @@ -274,17 +274,13 @@ mlkem_decap_tests(const char *fn, int rank, enum test_type test_type) | |||
| 274 | struct decap_ctx decap = { | 274 | struct decap_ctx decap = { |
| 275 | .rank = rank, | 275 | .rank = rank, |
| 276 | }; | 276 | }; |
| 277 | int ret = 0; | ||
| 278 | 277 | ||
| 279 | if (test_type == TEST_TYPE_NORMAL) | 278 | if (test_type == TEST_TYPE_NORMAL) |
| 280 | ret = parse_test_file(fn, &decap_parse, &decap); | 279 | return parse_test_file(fn, &decap_parse, &decap); |
| 281 | else if (test_type == TEST_TYPE_NIST) | 280 | if (test_type == TEST_TYPE_NIST) |
| 282 | ret = parse_test_file(fn, &nist_decap_parse, &decap); | 281 | return parse_test_file(fn, &nist_decap_parse, &decap); |
| 283 | else | 282 | |
| 284 | errx(1, "unknown decap test: rank %d, type %d", rank, | 283 | errx(1, "unknown decap test: rank %d, type %d", rank, test_type); |
| 285 | test_type); | ||
| 286 | |||
| 287 | return ret; | ||
| 288 | } | 284 | } |
| 289 | 285 | ||
| 290 | struct encap_ctx { | 286 | struct encap_ctx { |
| @@ -677,17 +673,13 @@ mlkem_keygen_tests(const char *fn, int rank, enum test_type test_type) | |||
| 677 | struct keygen_ctx keygen = { | 673 | struct keygen_ctx keygen = { |
| 678 | .rank = rank, | 674 | .rank = rank, |
| 679 | }; | 675 | }; |
| 680 | int ret = 0; | ||
| 681 | 676 | ||
| 682 | if (test_type == TEST_TYPE_NORMAL) | 677 | if (test_type == TEST_TYPE_NORMAL) |
| 683 | ret = parse_test_file(fn, &keygen_parse, &keygen); | 678 | return parse_test_file(fn, &keygen_parse, &keygen); |
| 684 | else if (test_type == TEST_TYPE_NIST) | 679 | if (test_type == TEST_TYPE_NIST) |
| 685 | ret = parse_test_file(fn, &nist_keygen_parse, &keygen); | 680 | return parse_test_file(fn, &nist_keygen_parse, &keygen); |
| 686 | else | 681 | |
| 687 | errx(1, "unknown keygen test: rank %d, type %d", rank, | 682 | errx(1, "unknown keygen test: rank %d, type %d", rank, test_type); |
| 688 | test_type); | ||
| 689 | |||
| 690 | return ret; | ||
| 691 | } | 683 | } |
| 692 | 684 | ||
| 693 | static int | 685 | static int |
