comparison uinput.c @ 9:5e15d64a2d24 default tip

If somebody closed stdin, fd could be both valid and 0, don’t check for that.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 18 Aug 2015 02:09:55 +0100
parents dec5fe6cd0d0
children
comparison
equal deleted inserted replaced
8:dec5fe6cd0d0 9:5e15d64a2d24
146 memset(&event, 0 , sizeof(event)); 146 memset(&event, 0 , sizeof(event));
147 147
148 event.type = EV_SYN; 148 event.type = EV_SYN;
149 event.code = SYN_REPORT; 149 event.code = SYN_REPORT;
150 150
151 if(fd){ 151 if(write(fd, &event, sizeof(event)) != sizeof(event))
152 if(write(fd, &event, sizeof(event) != sizeof(event))) 152 fprintf(stderr, " [%d] Flushing uinput failed\n", curdev);
153 fprintf(stderr, " [%d] Flushing uinput failed\n", curdev);
154 }
155 } 153 }
156 154
157 155
158 156
159 157