From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [libnftables PATCH 5/6] test: style cleanup
Date: Sun, 3 Nov 2013 22:33:27 +0100 [thread overview]
Message-ID: <20131103213327.GE10464@localhost> (raw)
In-Reply-To: <20131031123639.32572.83332.stgit@nfdev.cica.es>
On Thu, Oct 31, 2013 at 01:36:39PM +0100, Arturo Borrero Gonzalez wrote:
> Some style cleanups.
>
> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
> ---
> tests/nft-parsing-test.c | 34 ++++++++++++++++++++++------------
> 1 file changed, 22 insertions(+), 12 deletions(-)
>
> diff --git a/tests/nft-parsing-test.c b/tests/nft-parsing-test.c
> index 3d26c3a..e147e79 100644
> --- a/tests/nft-parsing-test.c
> +++ b/tests/nft-parsing-test.c
> @@ -193,8 +193,10 @@ static int test_json(const char *filename)
> if (json_object_get(root, "table") != NULL) {
> t = nft_table_alloc();
> if (t != NULL) {
> - if (nft_table_parse(t, NFT_TABLE_PARSE_JSON, json) == 0)
> - ret = compare_test(TEST_JSON_TABLE, t, filename);
> + if (nft_table_parse(t,
> + NFT_TABLE_PARSE_JSON, json) == 0)
> + ret = compare_test(TEST_JSON_TABLE,
> + t, filename);
> else
> goto failparsing;
If you need to break lines like this, it usually means that this code
needs to be split in smaller functions. Please, send me a clean up by
encapsulating the tests in new smaller functions, eg. test_json_table().
next prev parent reply other threads:[~2013-11-03 21:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 12:36 [libnftables PATCH 1/6] test: return EXIT_FAILURE if some error was found Arturo Borrero Gonzalez
2013-10-31 12:36 ` [libnftables PATCH 2/6] test: fix memleak in XML testing Arturo Borrero Gonzalez
2013-11-03 21:30 ` Pablo Neira Ayuso
2013-10-31 12:36 ` [libnftables PATCH 3/6] test: use constants for coloured strings Arturo Borrero Gonzalez
2013-11-03 21:31 ` Pablo Neira Ayuso
2013-10-31 12:36 ` [libnftables PATCH 4/6] test: report errors building XML tree Arturo Borrero Gonzalez
2013-11-03 21:31 ` Pablo Neira Ayuso
2013-10-31 12:36 ` [libnftables PATCH 5/6] test: style cleanup Arturo Borrero Gonzalez
2013-11-03 21:33 ` Pablo Neira Ayuso [this message]
2013-10-31 12:36 ` [libnftables PATCH 6/6] test: report compilation without support Arturo Borrero Gonzalez
2013-11-03 21:33 ` Pablo Neira Ayuso
2013-11-03 21:29 ` [libnftables PATCH 1/6] test: return EXIT_FAILURE if some error was found 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=20131103213327.GE10464@localhost \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox