[corosync] [PATCH] testcpg: fix build warning

Jan Friesse jfriesse at redhat.com
Fri Jun 1 06:40:35 GMT 2012


ACK

Fabio M. Di Nitto napsal(a):
> From: "Fabio M. Di Nitto"<fdinitto at redhat.com>
>
> Signed-off-by: Fabio M. Di Nitto<fdinitto at redhat.com>
> ---
>   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';
>   	}



More information about the discuss mailing list