From: Antonio Quartulli <ordex@autistici.org>
To: Sven Eckelmann <sven@narfation.org>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH 1/8] batman-adv: Move hash_ipv4 to distributed-arp-table.c
Date: Sat, 12 May 2012 14:07:25 +0200 [thread overview]
Message-ID: <20120512120721.GC14279@ritirata.org> (raw)
In-Reply-To: <1379829.aiuEal9R8A@sven-desktop.home.narfation.org>
[-- Attachment #1: Type: text/plain, Size: 1807 bytes --]
On Sat, May 12, 2012 at 02:01:41PM +0200, Sven Eckelmann wrote:
> On Saturday 12 May 2012 13:56:55 Antonio Quartulli wrote:
> > On Sat, May 12, 2012 at 01:48:52 +0200, Sven Eckelmann wrote:
> > > hash_ipv4 is only used in distributed-arp-table.c and therefore can be
> > > placed inside this file instead of the header.
> > >
> > > Signed-off-by: Sven Eckelmann <sven@narfation.org>
> > > ---
> > >
> > > distributed-arp-table.c | 24 +++++++++++++++++++++++-
> > > distributed-arp-table.h | 22 ----------------------
> > > 2 files changed, 23 insertions(+), 23 deletions(-)
> > >
> > > diff --git a/distributed-arp-table.c b/distributed-arp-table.c
> > > index e678ec4..4894a85 100644
> > > --- a/distributed-arp-table.c
> > > +++ b/distributed-arp-table.c
> > > @@ -32,6 +32,28 @@
> > >
> > > #include "translation-table.h"
> > > #include "unicast.h"
> > >
> > > +/* hash function to choose an entry in a hash table of given size.
> > > + * hash algorithm from http://en.wikipedia.org/wiki/Hash_table
> > > + */
> > > +static uint32_t batadv_hash_ipv4(const void *data, uint32_t size)
> >
> > since the function is static, why do we want to use the batadv prefix? would
> > this create confusion?
>
> Consistent naming scheme.
>
> Just imagine that somebody needs some function like that in another file and
> don't want to move it to the header. That would mean that he removes the
> static and add a declaration in the header file.... and now we have the
> problem of the missing batadv_ prefix. Either he changes the name everywhere
> or creates those potential namespace problems.
>
Oh ok. Then we will use it everywhere.
Thanks Sven.
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2012-05-12 12:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-12 11:48 [B.A.T.M.A.N.] [PATCH 1/8] batman-adv: Move hash_ipv4 to distributed-arp-table.c Sven Eckelmann
2012-05-12 11:48 ` [B.A.T.M.A.N.] [PATCH 2/8] batman-adv: Prefix bitarray static inline functions with batadv_ Sven Eckelmann
2012-05-15 8:16 ` Marek Lindner
2012-05-12 11:48 ` [B.A.T.M.A.N.] [PATCH 3/8] batman-adv: Prefix hard-interface " Sven Eckelmann
2012-05-15 8:19 ` Marek Lindner
2012-05-12 11:48 ` [B.A.T.M.A.N.] [PATCH 4/8] batman-adv: Prefix hash " Sven Eckelmann
2012-05-15 8:23 ` Marek Lindner
2012-05-12 11:48 ` [B.A.T.M.A.N.] [PATCH 5/8] batman-adv: Prefix originator " Sven Eckelmann
2012-05-15 8:31 ` Marek Lindner
2012-05-12 11:48 ` [B.A.T.M.A.N.] [PATCH 6/8] batman-adv: Prefix unicast " Sven Eckelmann
2012-05-15 8:34 ` Marek Lindner
2012-05-12 11:48 ` [B.A.T.M.A.N.] [PATCH 7/8] batman-adv: Prefix main " Sven Eckelmann
2012-05-15 8:43 ` Marek Lindner
2012-05-12 11:48 ` [B.A.T.M.A.N.] [PATCH 8/8] batman-adv: Prefix compat " Sven Eckelmann
2012-05-15 8:44 ` Marek Lindner
2012-05-12 11:56 ` [B.A.T.M.A.N.] [PATCH 1/8] batman-adv: Move hash_ipv4 to distributed-arp-table.c Antonio Quartulli
2012-05-12 12:01 ` Sven Eckelmann
2012-05-12 12:07 ` Antonio Quartulli [this message]
2012-05-15 8:14 ` Marek Lindner
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=20120512120721.GC14279@ritirata.org \
--to=ordex@autistici.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=sven@narfation.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