diff mbox

tests/drv_hangman: Fix uninitialized tail usage

Message ID 1446220713-585-1-git-send-email-mika.kuoppala@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kuoppala Oct. 30, 2015, 3:58 p.m. UTC
Tail needs to be in outer scope as it is used after loop
continuation destroying its scope.

Reported-by: Thomas Wood <thomas.wood@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
 tests/drv_hangman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index 6caf910..280f903 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -240,6 +240,7 @@  static void check_error_state(const int gen,
 	size_t line_size = 0;
 	char *ring_name = NULL;
 	bool bb_ok = false, req_ok = false, ringbuf_ok = false;
+	uint32_t tail;
 
 	debug_fd = igt_debugfs_open("i915_error_state", O_RDONLY);
 	igt_assert_lte(0, debug_fd);
@@ -252,7 +253,6 @@  static void check_error_state(const int gen,
 		uint64_t gtt_offset;
 		int req_matched = 0;
 		int requests;
-		uint32_t tail;
 		int ringbuf_matched = 0;
 		int i, items;