]> git.proxmox.com Git - mirror_corosync.git/commitdiff
testcpg: fix build warning
authorFabio M. Di Nitto <fdinitto@redhat.com>
Fri, 1 Jun 2012 06:18:19 +0000 (08:18 +0200)
committerFabio M. Di Nitto <fdinitto@redhat.com>
Fri, 1 Jun 2012 06:47:44 +0000 (08:47 +0200)
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
test/testcpg.c

index 065bf2d4202fc1dfd8960b656828c83b79435cca..0d823a203b8c344b88044307328ed10d566d46b9 100644 (file)
@@ -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';
        }