slock
simple X display locker utility
git clone https://9o.is/git/slock.git
commit 7ba1ebba9682369630ee9d717512ab8fc1bcc548 parent e984ae089626bb70f562c3dc4f8076b8a5fc311d Author: FRIGN <dev@frign.de> Date: Sat, 1 Oct 2016 23:56:33 +0200 Use NUL character constant explicitly Diffstat:
| M | slock.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/slock.c b/slock.c @@ -158,7 +158,7 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, continue; switch (ksym) { case XK_Return: - passwd[len] = 0; + passwd[len] = '\0'; errno = 0; if (!(inputhash = crypt(passwd, hash))) fprintf(stderr, "slock: crypt: %s\n", strerror(errno)); @@ -177,7 +177,7 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, break; case XK_BackSpace: if (len) - passwd[len--] = 0; + passwd[len--] = '\0'; break; default: if (num && !iscntrl((int)buf[0]) &&