[Libguestfs] [PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.
Pino Toscano
ptoscano at redhat.com
Fri Nov 2 16:15:47 UTC 2018
On Friday, 2 November 2018 16:05:04 CET Richard W.M. Jones wrote:
> diff --git a/common/utils/libxml2-writer-macros.h b/common/utils/libxml2-writer-macros.h
> index d74dcd465..a99b245bb 100644
> --- a/common/utils/libxml2-writer-macros.h
> +++ b/common/utils/libxml2-writer-macros.h
> @@ -86,7 +86,7 @@
> *
> * which produces C<<< <name>text</name> >>>
> */
> -#define single_element(element, str) \
> +#define single_element(element,str) \
> do { \
> start_element ((element)) { \
> string ((str)); \
This fits better as squashed in patch #3.
> - if (params->data->uefi_vars) {
> - start_element ("nvram") {
> - string (params->data->uefi_vars);
> - } end_element ();
> - }
> + if (params->data->uefi_vars)
> + single_element ("nvram", params->data->uefi_vars);
Hm indented with tab?
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20181102/829ec500/attachment.sig>
More information about the Libguestfs
mailing list