Browse Source

Merge commit '035ccdf' into bfgminer

Luke Dashjr 13 years ago
parent
commit
79e452417d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fpgautils.c

+ 1 - 1
fpgautils.c

@@ -256,7 +256,7 @@ _serial_read(int fd, char *buf, size_t bufsiz, char *eol)
 	ssize_t len, tlen = 0;
 	while (bufsiz) {
 		len = read(fd, buf, eol ? 1 : bufsiz);
-		if (len < 1)
+		if (unlikely(len == -1))
 			break;
 		tlen += len;
 		if (eol && *eol == buf[0])