From b1b9ff618bd417cd8a83d98def27cc07ad29ff77 Mon Sep 17 00:00:00 2001 From: Jeffrey Cliff Date: Sat, 23 Nov 2024 10:07:24 +0200 Subject: [PATCH] compose/paths: fix `false` <-> `NULL` confusion, errors on C23 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit i don't have access to github but this patch enabled me to compile libxkbcommon with -std=gnu23 otherwise the following compilation error will result : ../src/compose/paths.c:70:16: error: incompatible types when returning type ‘_Bool’ but ‘char *’ was expected ( gcc (GCC) 15.0.0 20240509 (experimental) ) Signed-off-by: Ran Benita --- src/compose/paths.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compose/paths.c b/src/compose/paths.c index 5a7e355d..84afe2c0 100644 --- a/src/compose/paths.c +++ b/src/compose/paths.c @@ -68,16 +68,16 @@ resolve_name(struct xkb_context *ctx, const char *filename, ret = snprintf(path, sizeof(path), "%s/%s", xlocaledir, filename); if (ret < 0 || (size_t) ret >= sizeof(path)) - return false; + return NULL; file = fopen(path, "rb"); if (!file) - return false; + return NULL; ok = map_file(file, &string, &string_size); fclose(file); if (!ok) - return false; + return NULL; s = string; end = string + string_size;