From: FRIGN Date: Sat, 1 Oct 2016 21:56:33 +0000 (+0200) Subject: Use NUL character constant explicitly X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;ds=inline;h=b099d2fd1868a5497069b85e5af0e6148077a6ba;p=slock.git Use NUL character constant explicitly --- diff --git a/slock.c b/slock.c index 2a3027e..47d2e21 100644 --- 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]) &&