[Sheepdog] [PATCH 8/9] sizeof problem: sizeof was applied to a global definition, rather then a local

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Tue May 18 02:53:19 CEST 2010


On Mon, 17 May 2010 09:37:16 -0700
Steven Dake <sdake at redhat.com> wrote:

> Have sizeof apply to proper local variable.
> 
> Signed-off-by: Steven Dake <sdake at redhat.com>
> ---
>  collie/collie.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/collie/collie.c b/collie/collie.c
> index ce3d086..d9f26fc 100644
> --- a/collie/collie.c
> +++ b/collie/collie.c
> @@ -919,7 +919,7 @@ static int cluster_info(int argc, char **argv)
>  
>  		ti = logs[i].ctime >> 32;
>  		localtime_r(&ti, &tm);
> -		strftime(time_str, sizeof(time), "%y-%m-%d %H:%M:%S", &tm);
> +		strftime(time_str, sizeof(time_str), "%y-%m-%d %H:%M:%S", &tm);

I think that this patch needs to be fold into 6th patch (otherwise,
6th patch breaks 'cluster info' output).

The rest looks fine to me.

Thanks!



More information about the sheepdog mailing list