public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <a@unstable.cc>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH v8 05/14] batman-adv: netlink: add translation table query
Date: Thu, 26 May 2016 16:42:32 +0800	[thread overview]
Message-ID: <20160526084232.GF13048@prodigo> (raw)
In-Reply-To: <8092239.9avV0sWEgV@bentobox>

[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]

On Thu, May 26, 2016 at 10:30:15AM +0200, Sven Eckelmann wrote:
> Hi,
> 
> thanks a lot for your feedback.
> 
> 
> On Thursday 26 May 2016 06:39:14 Linus Lüssing wrote:
> > On Mon, May 23, 2016 at 05:59:36PM +0200, Simon Wunderlich wrote:
> > > +static int
> > > +batadv_tt_local_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
> > > +			   struct batadv_priv *bat_priv,
> > > +			   struct batadv_tt_common_entry *common)
> > > +{
> > [...]
> > > +	if (!(common->flags & BATADV_TT_CLIENT_NOPURGE)) {
> > > +		if (nla_put_u32(msg, BATADV_ATTR_LAST_SEEN_MSECS,
> > > +				last_seen_msecs))
> > > +			goto nla_put_failure;
> > > +	}
> > 
> > Unnecessary brackets here, maybe use '&&' to skip a layer of
> > indention?
> 
> I would disagree here. The { } braces make sense because it is not a simple
> (single) statement inside the outer if body. But I am partially on your side
> regarding the extra indent. But having both in one statement is also weird
> because one is a simple check and the other one is a function call with side
> effects. So I am not 100% sure at the moment and will leave this untouched for
> now. Maybe Simon wants to add it or I will think about it a little bit more 
> about it.

Although having both statements in the same check wouldn't change the semantics,
I do agree that having a clear separation makes it easier to understand.


my 2 cents.

Cheers,


-- 
Antonio Quartulli

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-05-26  8:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 15:59 [B.A.T.M.A.N.] [PATCH v8 00/14] netns and netlink support Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 01/14] batman-adv: Handle parent interfaces in a different netns Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 02/14] batman-adv: Suppress debugfs entries for netns's Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 03/14] batman-adv: netlink: add routing_algo query Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 04/14] batman-adv: netlink: hardif query Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 05/14] batman-adv: netlink: add translation table query Simon Wunderlich
2016-05-26  4:39   ` Linus Lüssing
2016-05-26  8:30     ` Sven Eckelmann
2016-05-26  8:42       ` Antonio Quartulli [this message]
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 06/14] batman-adv: Provide TTVN in the mesh_info netlink msg Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 07/14] batman-adv: netlink: add originator and neighbor table queries Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 08/14] batman-adv: add B.A.T.M.A.N. IV bat_{orig, neigh}_dump implementations Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 09/14] batman-adv: add B.A.T.M.A.N. V " Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 10/14] batman-adv: add B.A.T.M.A.N. Dump gateways via netlink Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 11/14] batman-adv: add B.A.T.M.A.N. Dump BLA claims " Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 12/14] batman-adv: Provide bla group in the mesh_info netlink msg Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 13/14] batman-adv: add backbone table netlink support Simon Wunderlich
2016-05-23 15:59 ` [B.A.T.M.A.N.] [PATCH v8 14/14] batman-adv: Indicate netlink socket can be used with netns Simon Wunderlich
2016-05-23 16:03 ` [B.A.T.M.A.N.] [PATCH v8 00/14] netns and netlink support Simon Wunderlich

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=20160526084232.GF13048@prodigo \
    --to=a@unstable.cc \
    --cc=b.a.t.m.a.n@lists.open-mesh.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