diff options
author | FRIGN <dev@frign.de> | 2016-10-01 23:56:33 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-10-10 20:40:13 +0200 |
commit | b099d2fd1868a5497069b85e5af0e6148077a6ba (patch) | |
tree | 622a9ce1210a3eb2e939c49a846ea456d73f80f9 | |
parent | 0a43b78d00ebac574376ffd93223a751e21e265e (diff) | |
download | slock-b099d2fd1868a5497069b85e5af0e6148077a6ba.tar.gz slock-b099d2fd1868a5497069b85e5af0e6148077a6ba.tar.xz |
Use NUL character constant explicitly
-rw-r--r-- | slock.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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]) && |