[PATCH] UDF: possible usage of uninitialized variables

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

 



A few variables could be used without being explicitly initialized.
Fixed.

Signed-off-by: Cyrill Gorcunov <[email protected]>
---


 balloc.c |    6 +++++-
 super.c  |    5 ++++-
 2 files changed, 9 insertions(+), 2 deletions(-)


diff --git a/balloc.c b/balloc.c
index 4cec910..be37393 100644
--- a/balloc.c
+++ b/balloc.c
@@ -744,7 +744,11 @@ static int udf_table_new_block(struct super_block * sb,
 	uint32_t spread = 0xFFFFFFFF, nspread = 0xFFFFFFFF;
 	uint32_t newblock = 0, adsize;
 	uint32_t elen, goal_elen = 0;
-	kernel_lb_addr eloc, goal_eloc;
+	kernel_lb_addr eloc;
+	kernel_lb_addr goal_eloc = {
+		.logicalBlockNum = 0,
+		.partitionReferenceNum = 0,
+	};
 	struct extent_position epos, goal_epos;
 	int8_t etype;
 
diff --git a/super.c b/super.c
index 9b8644a..068a99c 100644
--- a/super.c
+++ b/super.c
@@ -1358,7 +1358,10 @@ udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset)
 			case UDF_VIRTUAL_MAP15:
 			case UDF_VIRTUAL_MAP20:
 			{
-				kernel_lb_addr ino;
+				kernel_lb_addr ino = {
+					.logicalBlockNum = 0,
+					.partitionReferenceNum = 0,
+				};
 
 				if (!UDF_SB_LASTBLOCK(sb))
 				{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux