From 98debc663ab9dd51c212c12be54057aa1b5f2557 Mon Sep 17 00:00:00 2001 From: Nikita Zlobin Date: Tue, 26 May 2020 18:32:58 +0500 Subject: [PATCH] simplify UINT_MAX_N Probably I was too precatious, not relying to common rule about unsigned subtraction to minus. --- src/draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/draw.c b/src/draw.c index 56dbf89..fb7548d 100644 --- a/src/draw.c +++ b/src/draw.c @@ -35,7 +35,7 @@ struct window_x11 *win; PangoFontDescription *pango_fdesc; -#define UINT_MAX_N(bits) (1 << (bits-1) | (( 1 << (bits-1) ) - 1)) +#define UINT_MAX_N(bits) ((1 << bits) - 1) void draw_setup(void) {