public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
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] batman-adv: use CRC32C instead of CRC16 in TT code
Date: Thu, 18 Apr 2013 00:55:40 +0800	[thread overview]
Message-ID: <201304180055.41009.lindner_marek@yahoo.de> (raw)
In-Reply-To: <1366136165-5839-1-git-send-email-ordex@autistici.org>

On Wednesday, April 17, 2013 02:16:05 Antonio Quartulli wrote:
> @@ -1376,13 +1376,11 @@ out:
>  static uint16_t batadv_tt_global_crc(struct batadv_priv *bat_priv,
>                                      struct batadv_orig_node *orig_node)
>  {
> -       uint16_t total = 0, total_one;
>         struct batadv_hashtable *hash = bat_priv->tt.global_hash;
>         struct batadv_tt_common_entry *tt_common;
>         struct batadv_tt_global_entry *tt_global;
>         struct hlist_head *head;
> -       uint32_t i;
> -       int j;
> +       uint32_t i, crc = 0;
>  
>         for (i = 0; i < hash->size; i++) {
>                 head = &hash->table[i];

How about making the function to "static uint32_t" ?


>  /* Calculates the checksum of the local table */
>  static uint16_t batadv_tt_local_crc(struct batadv_priv *bat_priv)
>  {
> -       uint16_t total = 0, total_one;
>         struct batadv_hashtable *hash = bat_priv->tt.local_hash;
>         struct batadv_tt_common_entry *tt_common;
>         struct hlist_head *head;
> -       uint32_t i;
> -       int j;
> +       uint32_t i, crc = 0;
>  
>         for (i = 0; i < hash->size; i++) {
>                 head = &hash->table[i];

Same here.


> @@ -1642,7 +1631,7 @@ out:
>  
>  static int batadv_send_tt_request(struct batadv_priv *bat_priv,
>                                   struct batadv_orig_node *dst_orig_node,
> -                                 uint8_t ttvn, uint16_t tt_crc,
> +                                 uint8_t ttvn, uint32_t tt_crc,
>                                   bool full_table)
>  {

Kernel doc ?  :)

Cheers,
Marek

  reply	other threads:[~2013-04-17 16:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 18:16 [B.A.T.M.A.N.] [PATCH] batman-adv: use CRC32C instead of CRC16 in TT code Antonio Quartulli
2013-04-17 16:55 ` Marek Lindner [this message]
2013-04-17 16:56   ` Antonio Quartulli

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=201304180055.41009.lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --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