Browse Source

Fix unreachable code warning in test case

bel 8 years ago
parent
commit
dc45cb2828
1 changed files with 2 additions and 2 deletions
  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;
 }