[PATCH] testcpg: fix build warning

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

 



From: "Fabio M. Di Nitto" <fdinitto@xxxxxxxxxx>

Signed-off-by: Fabio M. Di Nitto <fdinitto@xxxxxxxxxx>
---
 test/testcpg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/test/testcpg.c b/test/testcpg.c
index 065bf2d..0d823a2 100644
--- a/test/testcpg.c
+++ b/test/testcpg.c
@@ -105,8 +105,9 @@ print_time(void)
 
 	len = sizeof(hostname);
 	if(gethostname(hostname, len) == 0) {
+		char *longName;
 		hostname[len-1] = '\0';
-		char *longName = hostname;
+		longName = hostname;
 		if( (longName = strstr( hostname, "." )) != NULL )
 		*longName = '\0';
 	}
-- 
1.7.7.6

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux