[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120418064504.GB27966@ritirata.org>
Date: Wed, 18 Apr 2012 08:45:05 +0200
From: Antonio Quartulli <ordex@...istici.org>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, b.a.t.m.a.n@...ts.open-mesh.org,
lindner_marek@...oo.de
Subject: Re: [PATCH 05/11] batman-adv: handle routing code initialization
properly
On Tue, Apr 17, 2012 at 10:46:30 -0400, David Miller wrote:
> From: Antonio Quartulli <ordex@...istici.org>
> Date: Tue, 17 Apr 2012 13:58:21 +0200
>
> > @@ -30,10 +30,11 @@
> > #include "send.h"
> > #include "bat_algo.h"
> >
> > -static void bat_iv_ogm_iface_enable(struct hard_iface *hard_iface)
> > +static int bat_iv_ogm_iface_enable(struct hard_iface *hard_iface)
> > {
> > struct batman_ogm_packet *batman_ogm_packet;
> > unsigned long random_seqno;
> > + int res = -1;
> >
> > /* randomize initial seqno to avoid collision */
> > get_random_bytes(&random_seqno, sizeof(unsigned long));
>
> Use real error codes, even as a default, instead of meaningless
> values like -1.
Actually all these kind of return values are handled internally the batman-adv
code so we didn't care so much to use real error codes. However using real codes
will surely increase readability.
I will modify this patch and I'll try to suggest other developers to use real
codes too.
Thank you.
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists