From 734f628b4a89c3c368b260e3e76e18b83c42ddb6 Mon Sep 17 00:00:00 2001 From: Moritz Luedecke Date: Sun, 10 Sep 2017 10:59:36 +0200 Subject: Bracket the parameter for sizeof --- pinentry-dmenu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pinentry-dmenu.c') diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c index 1f05b1c..89896c4 100644 --- a/pinentry-dmenu.c +++ b/pinentry-dmenu.c @@ -29,7 +29,7 @@ #define INTERSECT(x, y, w, h, r) \ (MAX(0, MIN((x)+(w),(r).x_org+(r).width) - MAX((x),(r).x_org)) \ && MAX(0, MIN((y)+(h),(r).y_org+(r).height) - MAX((y),(r).y_org))) -#define LENGTH(X) (sizeof X / sizeof X[0]) +#define LENGTH(X) (sizeof(X) / sizeof(X[0])) #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) #define MINDESCLEN 8 @@ -461,7 +461,7 @@ paste(void) { Atom da; /* We have been given the current selection, now insert it into input */ - XGetWindowProperty(dpy, win, utf8, 0, (sizeof pin / 4) + 1, False, + XGetWindowProperty(dpy, win, utf8, 0, (sizeof(pin) / 4) + 1, False, utf8, &da, &di, &dl, &dl, (unsigned char **)&p); insert(p, (q = strchr(p, '\n')) ? q - p : (ssize_t) strlen(p)); XFree(p); -- cgit v1.2.3