[stgt] [PATCH] iscsi: fix compile warnings

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Tue Sep 28 05:10:35 CEST 2010


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 at lab.ntt.co.jp>
---
 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 at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list