[PATCH] depmod: fix uninitialized value error in "depmod --warn" code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



==12690== Conditional jump or move depends on uninitialised value(s)
==12690==    at 0x804A095: output_deps_bin (depmod.c:473)
==12690==    by 0x804CD85: main (depmod.c:1364)
==12690==  Uninitialised value was created by a stack allocation
==12690==    at 0x80517D3: add_value (index.c:86)

Signed-off-by: Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx>
---
 index.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/index.c b/index.c
index dbf9d31..d656c0f 100644
--- a/index.c
+++ b/index.c
@@ -85,7 +85,7 @@ static int add_value(struct index_value **values,
 		     const char *value, unsigned int priority)
 {
 	struct index_value *v;
-	int duplicate;
+	int duplicate = 0;
 	int len;
 
 	/* report the presence of duplicate values */
-- 
1.5.4.3



--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux