From 10ebb6da7cc42a98b85c4cb7a518a7817e122db3 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sun, 13 Dec 2020 19:14:14 +0100 Subject: [PATCH] compare formats[].format to skip compare --- src/tests/testformats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/testformats.c b/src/tests/testformats.c index 25aa41a2..f51b3392 100644 --- a/src/tests/testformats.c +++ b/src/tests/testformats.c @@ -161,10 +161,10 @@ int Test_Formats(char * errmsg) // now check that all other samples are not recognized for (j = 0; formats[j].name != NULL; j++) { - if (j == i) + if (formats[j].format == formats[i].format) continue; // skip Test_HGR(*.SCR) because Test_HGR() only tests for file size - if (strcmp(formats[i].name, "HGR") == 0 && strcmp(formats[j].name, "SCR") == 0) + if (formats[i].format == FORMAT_HGR && formats[j].format == FORMAT_SCR) continue; snprintf(path, sizeof(path), "../tests/pic-samples/%s", formats[j].sample); f = fopen(path, "rb");