[PATCH] iscsi: fix compile warnings

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

 



iscsi/target.c: In function ‘target_redirected’:
iscsi/target.c:242: warning: ‘rsn’ may be used uninitialized in this function
iscsi/target.c:243: warning: ‘port’ may be used uninitialized in this function

Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
---
 usr/iscsi/target.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr/iscsi/target.c b/usr/iscsi/target.c
index 507e93e..b097a58 100644
--- a/usr/iscsi/target.c
+++ b/usr/iscsi/target.c
@@ -239,8 +239,8 @@ int target_redirected(struct iscsi_target *target,
 	struct sockaddr_storage from;
 	struct addrinfo hints, *res;
 	socklen_t len;
-	int ret, rsn;
-	char *p, *q, *str, *port, *addr;
+	int ret, rsn = 0;
+	char *p, *q, *str, *port = NULL, *addr;
 	char buffer[NI_MAXHOST + NI_MAXSERV + 4];
 	char dst[INET6_ADDRSTRLEN], in_buf[1024];
 
-- 
1.7.1

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


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux