mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-24 18:34:52 +01:00
lib/string_map: fix return type of string_cmp
I can't figure out how checking the sign of a bool ever worked. The following program demonstrates the problem (i.e. for me it prints 1). #include <stdio.h> #include <stdbool.h> int main(int argc, char **argv) { bool x; x = -1; printf("x = %d\n", x); } This seems to be mandated by the C99 standard 6.3.1.2.
This commit is contained in:
parent
09595cf577
commit
e88297c072
2 changed files with 1 additions and 2 deletions
|
@ -106,7 +106,7 @@ _notmuch_string_map_sort (notmuch_string_map_t *map)
|
|||
map->sorted = true;
|
||||
}
|
||||
|
||||
static bool
|
||||
static int
|
||||
string_cmp (const char *a, const char *b, bool exact)
|
||||
{
|
||||
if (exact)
|
||||
|
|
|
@ -101,7 +101,6 @@ EOF
|
|||
test_expect_equal_file EXPECTED OUTPUT
|
||||
|
||||
test_begin_subtest "testing string map binary search (via message properties)"
|
||||
test_subtest_known_broken
|
||||
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
|
||||
{
|
||||
char *keys[] = {"a", "b", "c", "d", "e", NULL};
|
||||
|
|
Loading…
Reference in a new issue