[hackers] [slock] consistently use () with sizeof || Markus Teich
commit 10d4e479c5f6d91bf86e15be3a12c6b09c9808be
Author: Markus Teich <markus.teich_AT_stusta.mhn.de>
Date: Fri May 8 16:43:13 2015 +0200
consistently use () with sizeof
diff --git a/slock.c b/slock.c
index 1551a9e..68e813f 100644
--- a/slock.c
+++ b/slock.c
_AT_@ -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, 0);
+ num = XLookupString(&ev.xkey, buf, sizeof(buf), &ksym, 0);
if (IsKeypadKey(ksym)) {
if (ksym == XK_KP_Enter)
ksym = XK_Return;
_AT_@ -168,7 +168,7 @@ readpw(Display *dpy, const char *pws)
--len;
break;
default:
- if (num && !iscntrl((int) buf[0]) && (len + num < sizeof passwd)) {
+ if (num && !iscntrl((int) buf[0]) && (len + num < sizeof(passwd))) {
memcpy(passwd + len, buf, num);
len += num;
}
Received on Fri May 08 2015 - 17:42:37 CEST
This archive was generated by hypermail 2.3.0
: Fri May 08 2015 - 17:48:18 CEST