Browse Source

Merge commit '4820bde' into update_old_avalon_20130513

Luke Dashjr 13 years ago
parent
commit
4fa08c45e8
1 changed files with 3 additions and 3 deletions
  1. 3 3
      driver-avalon.c

+ 3 - 3
driver-avalon.c

@@ -223,12 +223,12 @@ static int avalon_gets(int fd, uint8_t *buf, int read_count,
 			ret = read(fd, buf, read_amount);
 			if (unlikely(ret < 0))
 				return AVA_GETS_ERROR;
-			if (first) {
-				if (tv_finish)
+			if (likely(first)) {
+				if (likely(tv_finish))
 					gettimeofday(tv_finish, NULL);
 				first = false;
 			}
-			if (ret >= read_amount)
+			if (likely(ret >= read_amount))
 				return AVA_GETS_OK;
 			buf += ret;
 			read_amount -= ret;