[Mauiusers] Another patch for maui-3.2.6p20-snap.1212617145

Brian Christiansen bchristiansen at clusterresources.com
Wed Jun 11 08:54:59 MDT 2008


We received both of your patches and are reviewing them.

Thanks,
Brian Christiansen

Eygene Ryabinkin wrote:
> While examining the sources of a new snapshot, I had found
> one more strange place that seem to have a bug.  Here we go:
> -----
> >From e36572bd2f1aac88fe617ccd3c882f0706acd025 Mon Sep 17 00:00:00 2001
> From: Eygene Ryabinkin <rea+maui at grid.kiae.ru>
> Date: Thu, 5 Jun 2008 13:10:09 +0400
> Subject: [PATCH] Clean up snprintf to MUSNprintF conversion in src/mcom/MSU.c.
>
> The above mentioned conversion in MSUSendData() took place, but it
> just traded 'sprintf(S->SBuffer,"%s%*%s",S->SBuffer,...)' to
> 'MUSNPrintF(&BPtr,&BSpace,"%s%*%s",S->SBuffer,...)' instead of doing
> 'MUSNPrintF(&BPtr,&BSpace,"%*%s",...)'.
>
> I had also changed 'strlen(S->SBuffer)' to 'strlen(tmpSBuf)' since
> BPtr is initialized with tmpSBuf, not with S->SBuffer, so it will
> be more consistent to use 'tmpSBuf'.
>
> Signed-off-by: Eygene Ryabinkin <rea+maui at grid.kiae.ru>
> ---
>  src/mcom/MSU.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/mcom/MSU.c b/src/mcom/MSU.c
> index 5cc493d..7aa7b87 100644
> --- a/src/mcom/MSU.c
> +++ b/src/mcom/MSU.c
> @@ -1183,10 +1183,9 @@ int MSUSendData(
>                MCKeyword[mckStatusCode],
>                scSUCCESS);
>  
> -            Align = (int)strlen(S->SBuffer) + (int)strlen(MCKeyword[mckArgs]);
> +            Align = (int)strlen(tmpSBuf) + (int)strlen(MCKeyword[mckArgs]);
>  
> -            MUSNPrintF(&BPtr,&BSpace,"%s%*s%s",
> -              S->SBuffer,
> +            MUSNPrintF(&BPtr,&BSpace,"%*s%s",
>                16 - (Align % 16),
>                " ",
>                MCKeyword[mckData]);
>   



More information about the mauiusers mailing list