aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFRIGN <dev@frign.de>2016-10-01 23:56:33 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-10-10 20:40:13 +0200
commitb099d2fd1868a5497069b85e5af0e6148077a6ba (patch)
tree622a9ce1210a3eb2e939c49a846ea456d73f80f9
parent0a43b78d00ebac574376ffd93223a751e21e265e (diff)
Use NUL character constant explicitly
-rw-r--r--slock.c4
1 files changed, 2 insertions, 2 deletions
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,
158 continue; 158 continue;
159 switch (ksym) { 159 switch (ksym) {
160 case XK_Return: 160 case XK_Return:
161 passwd[len] = 0; 161 passwd[len] = '\0';
162 errno = 0; 162 errno = 0;
163 if (!(inputhash = crypt(passwd, hash))) 163 if (!(inputhash = crypt(passwd, hash)))
164 fprintf(stderr, "slock: crypt: %s\n", strerror(errno)); 164 fprintf(stderr, "slock: crypt: %s\n", strerror(errno));
@@ -177,7 +177,7 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
177 break; 177 break;
178 case XK_BackSpace: 178 case XK_BackSpace:
179 if (len) 179 if (len)
180 passwd[len--] = 0; 180 passwd[len--] = '\0';
181 break; 181 break;
182 default: 182 default:
183 if (num && !iscntrl((int)buf[0]) && 183 if (num && !iscntrl((int)buf[0]) &&