netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 5/6] netlink_delinearize: rename netlink_parse_*_sreg/dreg functions
Date: Sun, 11 Jan 2015 08:09:41 +0000	[thread overview]
Message-ID: <1420963782-21189-6-git-send-email-kaber@trash.net> (raw)
In-Reply-To: <1420963782-21189-1-git-send-email-kaber@trash.net>

These are really badly chosen names, use parse_expr and parse_stmt instead.

Signed-off-by: Patrick McHardy <kaber@trash.net>
---
 src/netlink_delinearize.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index 79d5af6..5a89fce 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -342,7 +342,7 @@ static void netlink_parse_exthdr(struct netlink_parse_ctx *ctx,
 			     expr);
 }
 
-static void netlink_parse_meta_dreg(struct netlink_parse_ctx *ctx,
+static void netlink_parse_meta_expr(struct netlink_parse_ctx *ctx,
 				    const struct location *loc,
 				    const struct nft_rule_expr *nle)
 {
@@ -355,7 +355,7 @@ static void netlink_parse_meta_dreg(struct netlink_parse_ctx *ctx,
 			     expr);
 }
 
-static void netlink_parse_meta_sreg(struct netlink_parse_ctx *ctx,
+static void netlink_parse_meta_stmt(struct netlink_parse_ctx *ctx,
 				    const struct location *loc,
 				    const struct nft_rule_expr *nle)
 {
@@ -377,12 +377,12 @@ static void netlink_parse_meta(struct netlink_parse_ctx *ctx,
 			       const struct nft_rule_expr *nle)
 {
 	if (nft_rule_expr_is_set(nle, NFT_EXPR_META_DREG))
-		netlink_parse_meta_dreg(ctx, loc, nle);
+		netlink_parse_meta_expr(ctx, loc, nle);
 	else
-		netlink_parse_meta_sreg(ctx, loc, nle);
+		netlink_parse_meta_stmt(ctx, loc, nle);
 }
 
-static void netlink_parse_ct_sreg(struct netlink_parse_ctx *ctx,
+static void netlink_parse_ct_stmt(struct netlink_parse_ctx *ctx,
 				  const struct location *loc,
 				  const struct nft_rule_expr *nle)
 {
@@ -400,7 +400,7 @@ static void netlink_parse_ct_sreg(struct netlink_parse_ctx *ctx,
 	list_add_tail(&stmt->list, &ctx->rule->stmts);
 }
 
-static void netlink_parse_ct_dreg(struct netlink_parse_ctx *ctx,
+static void netlink_parse_ct_expr(struct netlink_parse_ctx *ctx,
 				  const struct location *loc,
 				  const struct nft_rule_expr *nle)
 {
@@ -417,9 +417,9 @@ static void netlink_parse_ct(struct netlink_parse_ctx *ctx,
 			     const struct nft_rule_expr *nle)
 {
 	if (nft_rule_expr_is_set(nle, NFT_EXPR_CT_DREG))
-		netlink_parse_ct_dreg(ctx, loc, nle);
+		netlink_parse_ct_expr(ctx, loc, nle);
 	else
-		netlink_parse_ct_sreg(ctx, loc, nle);
+		netlink_parse_ct_stmt(ctx, loc, nle);
 }
 
 static void netlink_parse_counter(struct netlink_parse_ctx *ctx,
-- 
2.1.0


  parent reply	other threads:[~2015-01-11  8:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-11  8:09 [PATCH 0/6] netlink: style and readability fixes Patrick McHardy
2015-01-11  8:09 ` [PATCH 1/6] netlink: remove unnecessary temporary variable Patrick McHardy
2015-01-11  8:09 ` [PATCH 2/6] netlink: style fixes Patrick McHardy
2015-01-11  8:09 ` [PATCH 3/6] " Patrick McHardy
2015-01-11  8:09 ` [PATCH 4/6] netlink: readability fixes Patrick McHardy
2015-01-11  8:09 ` Patrick McHardy [this message]
2015-01-11  8:09 ` [PATCH 6/6] netlink_delinearize: cleanup hard to read code Patrick McHardy

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=1420963782-21189-6-git-send-email-kaber@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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;
as well as URLs for NNTP newsgroup(s).