[hackers] [slock] Use NUL character constant explicitly || FRIGN

From: <git_AT_suckless.org>
Date: Mon, 10 Oct 2016 20:40:03 +0200 (CEST)

commit b099d2fd1868a5497069b85e5af0e6148077a6ba
Author: FRIGN <dev_AT_frign.de>
AuthorDate: Sat Oct 1 23:56:33 2016 +0200
Commit: Markus Teich <markus.teich_AT_stusta.mhn.de>
CommitDate: Mon Oct 10 20:40:13 2016 +0200

    Use NUL character constant explicitly

diff --git a/slock.c b/slock.c
index 2a3027e..47d2e21 100644
--- a/slock.c
+++ b/slock.c
_AT_@ -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));
_AT_@ -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]) &&
Received on Mon Oct 10 2016 - 20:40:03 CEST

This archive was generated by hypermail 2.3.0 : Mon Oct 10 2016 - 20:48:19 CEST