summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Luedecke <ritze@skweez.net>2017-09-10 10:59:36 +0200
committerMoritz Luedecke <ritze@skweez.net>2017-09-10 10:59:36 +0200
commit734f628b4a89c3c368b260e3e76e18b83c42ddb6 (patch)
treee1292bb5354aceab9dfe9ff73be1807dfac19244
parent6fc1c94d12bef7826a91b0b7e7b676a2b49f8891 (diff)
Bracket the parameter for sizeof
-rw-r--r--pinentry-dmenu.c4
1 files changed, 2 insertions, 2 deletions
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);