All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@meshcoding.com>
To: Simon Wunderlich <sw@simonwunderlich.de>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH-maint 3/3] batman-adv: always run purge_orig_neighbors
Date: Wed, 19 Mar 2014 13:06:33 +0100	[thread overview]
Message-ID: <53298849.5060104@meshcoding.com> (raw)
In-Reply-To: <1395225186-18597-4-git-send-email-sw@simonwunderlich.de>

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

Hi Simon,

On 19/03/14 11:33, Simon Wunderlich wrote:
> @@ -854,7 +854,7 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv,
>  {
>  	struct batadv_neigh_node *best_neigh_node;
>  	struct batadv_hard_iface *hard_iface;
> -	bool changed;
> +	bool changed, changed_neigh;
>  
>  	if (batadv_has_timed_out(orig_node->last_seen,
>  				 2 * BATADV_PURGE_TIMEOUT)) {
> @@ -865,7 +865,8 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv,
>  		return true;
>  	}
>  	changed = batadv_purge_orig_ifinfo(bat_priv, orig_node);
> -	changed = changed || batadv_purge_orig_neighbors(bat_priv, orig_node);
> +	changed_neigh = batadv_purge_orig_neighbors(bat_priv, orig_node);
> +	changed |= changed_neigh;
>  
>  	if (!changed)

Maybe we should just remove the |= and use this if condition:
	
	if (!changed && !changed_neigh)

?

The |= now is just useless..

Cheers,

-- 
Antonio Quartulli


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

  reply	other threads:[~2014-03-19 12:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 10:33 [B.A.T.M.A.N.] [PATCH-maint 0/3] fix multiif regressions Simon Wunderlich
2014-03-19 10:33 ` [B.A.T.M.A.N.] [PATCH-maint 1/3] batman-adv: fix neigh_ifinfo imbalance Simon Wunderlich
2014-03-19 10:33 ` [B.A.T.M.A.N.] [PATCH-maint 2/3] batman-adv: fix neigh reference imbalance Simon Wunderlich
2014-03-19 10:33 ` [B.A.T.M.A.N.] [PATCH-maint 3/3] batman-adv: always run purge_orig_neighbors Simon Wunderlich
2014-03-19 12:06   ` Antonio Quartulli [this message]
2014-03-19 12:19     ` [B.A.T.M.A.N.] [PATCH-maintv2 " 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=53298849.5060104@meshcoding.com \
    --to=antonio@meshcoding.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=sw@simonwunderlich.de \
    /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.