X-Git-Url: https://git.armaanb.net/?p=slock.git;a=blobdiff_plain;f=slock.c;h=68e813f4e86041ed7be45492771adcdfcb7d9187;hp=1551a9ec30983a9f1b76c1276a4f82053c154684;hb=10d4e479c5f6d91bf86e15be3a12c6b09c9808be;hpb=b1289f30b79c9c5ea43a9e9c624406d7d0661692 diff --git a/slock.c b/slock.c index 1551a9e..68e813f 100644 --- 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; }