[libvirt] [PATCH] virsh: Define multi line macros properly

Peter Krempa pkrempa at redhat.com
Tue Oct 31 12:49:43 UTC 2017


On Tue, Oct 31, 2017 at 13:37:55 +0100, Andrea Bolognani wrote:
> On Tue, 2017-10-31 at 12:39 +0100, Michal Privoznik wrote:
> > @@ -781,7 +781,7 @@ static const vshCmdOptDef opts_attach_interface[] = {
> >   * 'average,peak,burst,floor', in which peak and burst are optional,
> >   * thus 'average,,burst' and 'average,peak' are also legal. */
> >  
> > -#define VIRSH_PARSE_RATE_FIELD(index, name)                                      \
> > +#define VIRSH_PARSE_RATE_FIELD(index, name)                                    \
> >      do {                                                                       \
> >          if (index < ntok &&                                                    \
> >              *tok[index] != '\0' &&                                             \
> [...]
> > @@ -9096,7 +9096,7 @@ cmdMemtune(vshControl *ctl, const vshCmd *cmd)
> >          return false;
> >  
> >  #define PARSE_MEMTUNE_PARAM(NAME, FIELD)                                    \
> > -    if ((rc = virshMemtuneGetSize(ctl, cmd, NAME, &tmpVal)) < 0) {            \
> > +    if ((rc = virshMemtuneGetSize(ctl, cmd, NAME, &tmpVal)) < 0) {          \
> >          vshError(ctl, _("Unable to parse integer parameter %s"), NAME);     \
> >          goto cleanup;                                                       \
> >      }                                                                       \
> 
> As an aside, I'd really like if we could stop trying to be cute by
> right-aligning backslashes, thus making silly adjustments like the
> above wholly unnecessary.

You'll need to come up with a syntax-check rule. Otherwise attempting to
change that will be futile.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20171031/3c0e9bc5/attachment-0001.sig>


More information about the libvir-list mailing list