Skip to contentSkip to conversation

cmd/time.c: Initialize 'repeatable' variable

PATCH In review Tom Rini 1 participant 2 messages Sep 27, 2017 – Oct 7, 2017

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 cmd/time.c: Initialize 'repeatable' variable

We cannot leave this uninitialized, set it to 0.

Reported-by Coverity (CID: 144426)
---
 cmd/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/time.c +1 -1
index de57e3b9dd5e..2cd8b1a57777 100644
@@ -28,7 +28,7 @@ static int do_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	ulong cycles = 0;
 	int retval = 0;
-	int repeatable;
+	int repeatable = 0;
 
 	if (argc == 1)
 		return CMD_RET_USAGE;
Signature · 1 line
1.9.1
author
#1 lore raw
Quoted 4 lines · Tom Rini

We cannot leave this uninitialized, set it to 0.

Reported-by Coverity (CID: 144426)

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171007/9aaba6f0/attachment.sig>