mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 2/2] time command: Fix needed string length
@ 2011-12-08  9:45 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2011-12-08  9:45 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/time.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/commands/time.c b/commands/time.c
index 9a76945..c2633ba 100644
--- a/commands/time.c
+++ b/commands/time.c
@@ -10,7 +10,7 @@ static int do_time(struct command *cmdtp, int argc, char *argv[])
 	unsigned char *buf;
 	u64 start, end, diff64;
 	unsigned long diff;
-	int len = 0;
+	int len = 1; /* '\0' */
 
 	if (argc < 2)
 		return COMMAND_ERROR_USAGE;
-- 
1.7.7.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-08  9:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-08  9:45 [PATCH 2/2] time command: Fix needed string length Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox