consistently use () with sizeof - slock - simple X display locker utility | |
git clone git://git.suckless.org/slock | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 10d4e479c5f6d91bf86e15be3a12c6b09c9808be | |
parent b1289f30b79c9c5ea43a9e9c624406d7d0661692 | |
Author: Markus Teich <[email protected]> | |
Date: Fri, 8 May 2015 16:43:13 +0200 | |
consistently use () with sizeof | |
Diffstat: | |
M slock.c | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/slock.c b/slock.c | |
@@ -133,7 +133,7 @@ readpw(Display *dpy, const char *pws) | |
while (running && !XNextEvent(dpy, &ev)) { | |
if (ev.type == KeyPress) { | |
buf[0] = 0; | |
- num = XLookupString(&ev.xkey, buf, sizeof buf, &ksym, … | |
+ num = XLookupString(&ev.xkey, buf, sizeof(buf), &ksym,… | |
if (IsKeypadKey(ksym)) { | |
if (ksym == XK_KP_Enter) | |
ksym = XK_Return; | |
@@ -168,7 +168,7 @@ readpw(Display *dpy, const char *pws) | |
--len; | |
break; | |
default: | |
- if (num && !iscntrl((int) buf[0]) && (len + nu… | |
+ if (num && !iscntrl((int) buf[0]) && (len + nu… | |
memcpy(passwd + len, buf, num); | |
len += num; | |
} |