From 03af1408410e3e1ab0952e1fab6d7acf94b014ef Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Mon, 24 Aug 2015 21:45:08 -0500 Subject: use xor instead of incrementing blink Because blink is a signed integer, an eventual overflow would result in undefined behavior. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 784f7f2..422d707 100644 --- a/main.c +++ b/main.c @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) tv.tv_sec = 0; tv.tv_usec = 250000; if (select(max, &fds, &wfds, NULL, &tv) <= 0) { - d.blink++; + d.blink ^= 1; FD_ZERO(&fds); } -- cgit v1.2.3