diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2015-05-08 16:43:13 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2015-05-08 16:44:18 +0200 |
commit | 10d4e479c5f6d91bf86e15be3a12c6b09c9808be (patch) | |
tree | 41ce5b70ab82c44fb86d152108d200d226d33ca9 | |
parent | b1289f30b79c9c5ea43a9e9c624406d7d0661692 (diff) | |
download | slock-10d4e479c5f6d91bf86e15be3a12c6b09c9808be.tar.gz slock-10d4e479c5f6d91bf86e15be3a12c6b09c9808be.tar.xz |
consistently use () with sizeof
-rw-r--r-- | slock.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |