소스 검색

Fix unreachable code warning in test case

bel 8 년 전
부모
커밋
dc45cb2828
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      test/timertest.c

+ 2 - 2
test/timertest.c

@@ -54,10 +54,10 @@ action_dec(void *arg)
 
 	if (*p < -1) {
 		ck_abort_msg("Periodic timer called too often");
-		return 0;
+        /* return 0 here would be unreachable code */
 	}
 
-	return action_dec_ret;
+	return (*p >= -3) ? action_dec_ret : 0;
 }