summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Haverkamp <haver@vnet.ibm.com>2007-02-16 16:22:26 +0100
committerJosh Boyer <jwboyer@gmail.com>2007-02-21 07:23:19 -0600
commite1e4f5429a155a6bd9a9d384f91d597cab157ee3 (patch)
tree902b2ab688fd5a49d414d8e95b6511116f44455d
parent9fe86e65fb6bd77a02955d07d6f336ace4984e2d (diff)
UBI Utils: Fix uninitialized written parameter
The variable written was not properly initialized. That causes the -j option to fail. Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
-rw-r--r--ubi-utils/src/bin2nand.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ubi-utils/src/bin2nand.c b/ubi-utils/src/bin2nand.c
index 20fc90a..7c4c816 100644
--- a/ubi-utils/src/bin2nand.c
+++ b/ubi-utils/src/bin2nand.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) International Business Machines Corp., 2006
+ * Copyright (c) International Business Machines Corp., 2007
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,6 +28,7 @@
* 1.3 Padds data/oob to a given size. (oloh)
* 1.4 Removed argp because we want to use uClibc.
* 1.5 Minor cleanup
+ * 1.6 written variable not initialized (-j did not work) (haver)
*/
#include <unistd.h>
@@ -46,7 +47,7 @@
#include "config.h"
#include "nandecc.h"
-#define PROGRAM_VERSION "1.5"
+#define PROGRAM_VERSION "1.6"
#define CHECK_ENDP(option, endp) do { \
if (*endp) { \
@@ -248,7 +249,7 @@ int main (int argc, char** argv)
{
int rc = -1;
int res = 0;
- size_t written, read;
+ size_t written = 0, read;
myargs args = {
.action = ACT_NORMAL,
.pagesize = PAGESIZE,