Fix ioctl(KDSETLED)
authorteodor <teodor>
Tue, 1 Dec 2009 17:43:45 +0000 (17:43 +0000)
committerteodor <teodor>
Tue, 1 Dec 2009 17:43:45 +0000 (17:43 +0000)
blinker.c

index 57ec13d..64f27a4 100644 (file)
--- a/blinker.c
+++ b/blinker.c
@@ -111,7 +111,7 @@ execKbd(struct Blinker * blinker, int RxAction, int TxAction) {
                else
                        flag &= ~blinker->TxLed;
 
-               if (ioctl(0, KDSETLED, &flag) == -1)
+               if (ioctl(0, KDSETLED, flag) == -1)
                        tlog(TL_WARN,"unable to set NumLock led: %s",
                                                strerror(errno));
 
@@ -182,8 +182,7 @@ main(int argc, char *argv[]) {
 
        memset(&blinker, 0, sizeof(blinker));
 
-       if (ioctl(0, KDGKBINFO, &info) == 0)
-       {
+       if (ioctl(0, KDGKBINFO, &info) == 0) {
                blinker.TxLed = LED_CAP;
                blinker.RxLed = LED_NUM;
                blinker.exec = execKbd;