From 1d459fc725dc303f9bbeb9f893d9eb735b2a5e96 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 29 Oct 2018 07:23:32 +0000 Subject: [PATCH] Fix misuse of FALSE for null pointer return values. x11_char_struct returns a pointer or NULL, so while returning FALSE would have ended up doing the right thing after macro expansion and integer->pointer conversion, it wasn't actually how I _meant_ to spell a failure return. --- unix/gtkfont.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/gtkfont.c b/unix/gtkfont.c index c2a610f1..3dbf16f0 100644 --- a/unix/gtkfont.c +++ b/unix/gtkfont.c @@ -388,13 +388,13 @@ static const XCharStruct *x11_char_struct( */ if (byte2 < xfs->min_char_or_byte2 || byte2 > xfs->max_char_or_byte2) - return FALSE; + return NULL; if (xfs->min_byte1 == 0 && xfs->max_byte1 == 0) { index = byte2 - xfs->min_char_or_byte2; } else { if (byte1 < xfs->min_byte1 || byte1 > xfs->max_byte1) - return FALSE; + return NULL; index = ((byte2 - xfs->min_char_or_byte2) + ((byte1 - xfs->min_byte1) * (xfs->max_char_or_byte2 - xfs->min_char_or_byte2 + 1)));