]> git.armaanb.net Git - slock.git/commitdiff
Use NUL character constant explicitly
authorFRIGN <dev@frign.de>
Sat, 1 Oct 2016 21:56:33 +0000 (23:56 +0200)
committerMarkus Teich <markus.teich@stusta.mhn.de>
Mon, 10 Oct 2016 18:40:13 +0000 (20:40 +0200)
slock.c

diff --git a/slock.c b/slock.c
index 2a3027e5eeada19c451d7becf99c86195f298129..47d2e2134bedea54f8ae8831ef03eb4dddef5260 100644 (file)
--- 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]) &&