Skip to contentSkip to conversation

tools: ffs-aio-example: fix uninitialized boolean variable 'ready'

PATCH New Colin King 1 participant 1 message Feb 11, 2019 Kernel janitors

lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 tools: ffs-aio-example: fix uninitialized boolean variable 'ready'

From: Colin Ian King <[email protected]>

The boolean variable is uninitialized and is only set if file descriptor ep0 is ready. Fix this by ensuring the variable is initialized by setting it to false.

Fixes b34e08d5c706 ("tools: usb: aio example applications")
---
 tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c +1 -1
index aaca1f44e788..1dda6e816b3c 100644
@@ -246,7 +246,7 @@ int main(int argc, char *argv[])
 
 	struct io_buffer iobuf[2];
 	int actual = 0;
-	bool ready;
+	bool ready = false;
 
 	if (argc != 2) {
 		printf("ffs directory not specified!\n");
Signature · 1 line
2.20.1