Use NUL character constant explicitly

This commit is contained in:
FRIGN 2016-10-01 23:56:33 +02:00 committed by Markus Teich
parent 0a43b78d00
commit b099d2fd18
1 changed files with 2 additions and 2 deletions

View File

@ -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]) &&