From b9b7c37980a2d4cdf85ecd764cf2f6987d54835c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
Date: Thu, 25 Jul 2024 14:21:15 +0200
Subject: [PATCH] str: use correct cdada comparison function for a regular C
 string

The cdada_str_ncmp_c function must be used for comparison with regular C
string, otherwise str_test aborts.

Fixes: be47ae8cb148 ("str: add cdada_str_ncmp/cdada_str_ncmp_c")

Upstream-PR: https://github.com/msune/libcdada/pull/18

diff --git a/test/str_test.c b/test/str_test.c
index 5805a87..01d7b6c 100644
--- a/test/str_test.c
+++ b/test/str_test.c
@@ -408,9 +408,9 @@ int test_cmp(){
 			== strncmp(s1, s2, overlen_avoid_compiler_warn));
 
 	TEST_ASSERT(cdada_str_ncmp_c(c1, s2, 7) == strncmp(s1, s2, 7));
-	TEST_ASSERT(cdada_str_ncmp(c1, s2, 10) == strncmp(s1, s2, 10));
-	TEST_ASSERT(cdada_str_ncmp(c1, s2, 12) == strncmp(s1, s2, 12));
-	TEST_ASSERT(cdada_str_ncmp(c1, s2, overlen_avoid_compiler_warn)
+	TEST_ASSERT(cdada_str_ncmp_c(c1, s2, 10) == strncmp(s1, s2, 10));
+	TEST_ASSERT(cdada_str_ncmp_c(c1, s2, 12) == strncmp(s1, s2, 12));
+	TEST_ASSERT(cdada_str_ncmp_c(c1, s2, overlen_avoid_compiler_warn)
 			== strncmp(s1, s2, overlen_avoid_compiler_warn));
 
 	rv = cdada_str_destroy(c1);
