summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-12-26 05:51:41 +0000
committertb <>2024-12-26 05:51:41 +0000
commitf6bed4a99db17d77c283519bd8b4bd8a6f8d6253 (patch)
tree02414c952b8b966cd4255d93df8a359a68d168fe /src
parentbf8e569bea5d828bfec263bcbf4d5e4f0cca2531 (diff)
downloadopenbsd-f6bed4a99db17d77c283519bd8b4bd8a6f8d6253.tar.gz
openbsd-f6bed4a99db17d77c283519bd8b4bd8a6f8d6253.tar.bz2
openbsd-f6bed4a99db17d77c283519bd8b4bd8a6f8d6253.zip
mlkem tests: whitespace tweak and fix an error message
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/mlkem/parse_test_file.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/mlkem/parse_test_file.c b/src/regress/lib/libcrypto/mlkem/parse_test_file.c
index d79fa3dfd5..4138e82b67 100644
--- a/src/regress/lib/libcrypto/mlkem/parse_test_file.c
+++ b/src/regress/lib/libcrypto/mlkem/parse_test_file.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: parse_test_file.c,v 1.1 2024/12/26 00:04:24 tb Exp $ */ 1/* $OpenBSD: parse_test_file.c,v 1.2 2024/12/26 05:51:41 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2024 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2024 Theo Buehler <tb@openbsd.org>
@@ -170,9 +170,11 @@ parse_state_advance(struct parse_state *ps)
170 170
171struct parse { 171struct parse {
172 struct parse_state state; 172 struct parse_state state;
173 CBS cbs; 173
174 char *buf; 174 char *buf;
175 size_t buf_max; 175 size_t buf_max;
176 CBS cbs;
177
176 const struct test_parse *tctx; 178 const struct test_parse *tctx;
177 void *ctx; 179 void *ctx;
178 180
@@ -391,7 +393,7 @@ parse_state_set_from_cbb(struct parse *p, CBB *cbb)
391{ 393{
392 if (parse_line_type(p) != LINE_HEX) 394 if (parse_line_type(p) != LINE_HEX)
393 parse_errx(p, "%s: want %d, got %d", __func__, 395 parse_errx(p, "%s: want %d, got %d", __func__,
394 LINE_STRING_MATCH, parse_line_type(p)); 396 LINE_HEX, parse_line_type(p));
395 if (!line_data_set_from_cbb(parse_state_data(p)[parse_cur(p)], cbb)) 397 if (!line_data_set_from_cbb(parse_state_data(p)[parse_cur(p)], cbb))
396 parse_errx(p, "line_data_set_from_cbb"); 398 parse_errx(p, "line_data_set_from_cbb");
397} 399}