WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] libxl: off by one fix for new network-attach arg

To: Marek Marczykowski <marmarek@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libxl: off by one fix for new network-attach args parsing
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Fri, 17 Jun 2011 18:58:10 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 17 Jun 2011 10:59:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <764214d25cd9825925ae.1307904851@devel14>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <764214d25cd9825925ae.1307904851@devel14>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Marek Marczykowski writes ("[Xen-devel] [PATCH] libxl: off by one fix for new 
network-attach args parsing"):
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -1238,7 +1238,7 @@ static int match_option_size(const char 
>      return !rc;
>  }
>  #define match_option(_prefix, _arg, _oparg) \
> -    match_option_size((_prefix "="), sizeof((_prefix)) + 1, (_arg), 
> &(_oparg))
> +    match_option_size((_prefix "="), sizeof((_prefix)), (_arg), &(_oparg))

I haven't applied your patch yet, so could you fold this in and resend
please ?

Why do you use _'d names for the macro formal parameters ?  This is
not our usual coding style.

Finally can you please make sure that your patch has lines of only
around 75 characters, and call the macro MATCH_OPTION since it's not a
normal function.

thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel