[hackers] [ubase] No need to skip stdin in chvt(1) || sin

From: <git_AT_suckless.org>
Date: Mon, 30 Jun 2014 20:18:54 +0200

commit 29bc0ce1303509c0ef39c775871932aafae1a127
Author: sin <sin_AT_2f30.org>
Date: Mon Jun 30 16:55:00 2014 +0100

    No need to skip stdin in chvt(1)

diff --git a/chvt.c b/chvt.c
index 9323b5b..2dbbdb6 100644
--- a/chvt.c
+++ b/chvt.c
_AT_@ -41,7 +41,7 @@ main(int argc, char *argv[])
         n = estrtol(argv[1], 10);
         for (i = 0; i < LEN(vts); i++) {
                 fd = open(vts[i], O_RDONLY);
- if (fd < 1)
+ if (fd < 0)
                         continue;
                 c = 0;
                 if (ioctl(fd, KDGKBTYPE, &c) == 0)
Received on Mon Jun 30 2014 - 20:18:54 CEST

This archive was generated by hypermail 2.3.0 : Mon Jun 30 2014 - 20:24:08 CEST