Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1561b326 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

selftests/net: rxtimestamp: Fix an off by one



The > should be >= so that we don't write one element beyond the end of
the array.

Fixes: 16e78122 ("selftests/net: Add a test to validate behavior of rx timestamps")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7a92616c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -341,7 +341,7 @@ int main(int argc, char **argv)
			return 0;
		case 'n':
			t = atoi(optarg);
			if (t > ARRAY_SIZE(test_cases))
			if (t >= ARRAY_SIZE(test_cases))
				error(1, 0, "Invalid test case: %d", t);
			all_tests = false;
			test_cases[t].enabled = true;