From 2829fd0fb9c0a4ab787bda4f987737918693f94e Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Mon, 12 Dec 2011 09:35:54 +0100 Subject: [PATCH] Fix CRC in test cases on big endian systems. Noticed failure in Debian build of 1.6.2 on mips. --- tests/test_args_to_config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_args_to_config.c b/tests/test_args_to_config.c index 63435e5..edb8e19 100644 --- a/tests/test_args_to_config.c +++ b/tests/test_args_to_config.c @@ -86,6 +86,7 @@ void _check_success(int rc, YKP_CONFIG *cfg, unsigned char expected[], int calle /* insert CRC */ ycfg->crc = ~yubikey_crc16 ((unsigned char *) ycfg, offsetof(struct config_st, crc)); + ycfg->crc = yk_endian_swap_16(ycfg->crc); config_matches_expected = ! memcmp(expected, ycfg, sizeof(*ycfg)); if (! config_matches_expected) { -- 2.39.5