slock
simple X display locker utility
git clone https://9o.is/git/slock.git
commit 59bf26cde424d566ebac152dc68c1e4c3fe63ab3 parent c46625f0eb769f3c18ef59e1fbbcecb94316f1b4 Author: Markus Teich <markus.teich@stusta.mhn.de> 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, 0); + num = XLookupString(&ev.xkey, buf, sizeof(buf), &ksym, 0); 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 + num < sizeof passwd)) { + if (num && !iscntrl((int) buf[0]) && (len + num < sizeof(passwd))) { memcpy(passwd + len, buf, num); len += num; }