diff options
| author | David Bremner <david@tethera.net> | 2019-03-02 14:10:51 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2019-03-05 21:46:41 -0400 |
| commit | e88297c072e6bfbeaedc1287ec695ca37537255e (patch) | |
| tree | 6818b3778d0095c6c74d204799f8041a0f1501f1 /lib/string-map.c | |
| parent | 09595cf577616f657fdfcd235c4e04d91b3c020a (diff) | |
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.
Diffstat (limited to 'lib/string-map.c')
| -rw-r--r-- | lib/string-map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/string-map.c b/lib/string-map.c index ad818207..a88404c7 100644 --- a/lib/string-map.c +++ b/lib/string-map.c @@ -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) |
