slock with DPMS and other tweaks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

consistently use () with sizeof

+2 -2
+2 -2
slock.c
··· 133 133 while (running && !XNextEvent(dpy, &ev)) { 134 134 if (ev.type == KeyPress) { 135 135 buf[0] = 0; 136 - num = XLookupString(&ev.xkey, buf, sizeof buf, &ksym, 0); 136 + num = XLookupString(&ev.xkey, buf, sizeof(buf), &ksym, 0); 137 137 if (IsKeypadKey(ksym)) { 138 138 if (ksym == XK_KP_Enter) 139 139 ksym = XK_Return; ··· 168 168 --len; 169 169 break; 170 170 default: 171 - if (num && !iscntrl((int) buf[0]) && (len + num < sizeof passwd)) { 171 + if (num && !iscntrl((int) buf[0]) && (len + num < sizeof(passwd))) { 172 172 memcpy(passwd + len, buf, num); 173 173 len += num; 174 174 }