pinentry-dmenu

a pinentry program based on dmenu
git clone anongit@rnpnr.xyz:pinentry-dmenu.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 734f628b4a89c3c368b260e3e76e18b83c42ddb6
Parent: 6fc1c94d12bef7826a91b0b7e7b676a2b49f8891
Author: Moritz Luedecke
Date:   Sun, 10 Sep 2017 10:59:36 +0200

Bracket the parameter for sizeof

Diffstat:
Mpinentry-dmenu.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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);