All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH 3/4] rule: delete extra space in sets printing
Date: Tue, 5 Jan 2016 12:28:15 +0100	[thread overview]
Message-ID: <20160105112815.GC8791@salvia> (raw)
In-Reply-To: <145190991706.22285.17585254866421222372.stgit@r2d2.cica.es>

On Mon, Jan 04, 2016 at 01:18:37PM +0100, Arturo Borrero Gonzalez wrote:
> The extra space is printed when sets are printed in tabulated format.
> However, the space is still required in printing in plain format (ie, monitor).
> 
> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
> ---
>  0 files changed
> 
> diff --git a/src/rule.c b/src/rule.c
> index c0e45aa..ab39513 100644
> --- a/src/rule.c
> +++ b/src/rule.c
> @@ -267,7 +267,10 @@ static void set_print_declaration(const struct set *set,
>  	if (opts->table != NULL)
>  		printf(" %s", opts->table);
>  
> -	printf(" %s { %s", set->handle.set, opts->nl);
> +	printf(" %s {%s", set->handle.set, opts->nl);
> +
> +	if (!strcmp(opts->nl, ""))

This could be replaced by:

        if (!opts->nl[0])

But could you post what output you're trying to fix?

Thanks.

> +		printf(" ");
>  
>  	printf("%s%stype %s", opts->tab, opts->tab, set->keytype->name);
>  	if (set->flags & SET_F_MAP)
> 

  reply	other threads:[~2016-01-05 11:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04 12:18 [nft PATCH 1/4] rule: don't list anonymous sets Arturo Borrero Gonzalez
2016-01-04 12:18 ` [nft PATCH 2/4] rule: when listing all sets, don't print empty tables Arturo Borrero Gonzalez
2016-01-05 11:19   ` Pablo Neira Ayuso
2016-01-05 11:35   ` Pablo Neira Ayuso
2016-01-05 11:40     ` Pablo Neira Ayuso
2016-01-05 12:10       ` Arturo Borrero Gonzalez
2016-01-04 12:18 ` [nft PATCH 3/4] rule: delete extra space in sets printing Arturo Borrero Gonzalez
2016-01-05 11:28   ` Pablo Neira Ayuso [this message]
2016-01-05 11:35     ` Arturo Borrero Gonzalez
2016-01-04 12:18 ` [nft PATCH 4/4] tests/operations: add some listing tests Arturo Borrero Gonzalez
2016-01-05 12:12   ` Arturo Borrero Gonzalez
2016-01-05 11:19 ` [nft PATCH 1/4] rule: don't list anonymous sets Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160105112815.GC8791@salvia \
    --to=pablo@netfilter.org \
    --cc=arturo.borrero.glez@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.