public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Cc: Marek Lindner <lindner_marek@yahoo.de>
Subject: Re: [B.A.T.M.A.N.] [PATCHv3] batman-adv: modify TT_RESPONSE-full-table format
Date: Wed, 1 Jun 2011 07:34:25 +0200	[thread overview]
Message-ID: <20110601053425.GA27695@lunn.ch> (raw)
In-Reply-To: <1306780839-9375-1-git-send-email-ordex@autistici.org>

> +	ssize_t tt_query_size = sizeof(struct tt_query_packet);
> +	int i;
> +
> +	if (sizeof(struct tt_query_packet) + tt_len >
> +						primary_if->soft_iface->mtu) {
> +		tt_len = primary_if->soft_iface->mtu - tt_query_size;
> +		tt_len -= tt_len % sizeof(struct tt_change);
> +	}

Hi Antonio

This first struck me as being asymmetric. Then i say that
tt_query_size is sizeof(struct tt_query_packet). So use it in the if
statement, and then symmetry is restored and probably the indentation
looks better.

      Andrew

  parent reply	other threads:[~2011-06-01  5:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29 23:05 [B.A.T.M.A.N.] [PATCH] batman-adv: modify TT_RESPONSE-full-table format Antonio Quartulli
2011-05-30 13:46 ` Marek Lindner
2011-05-30 18:40   ` [B.A.T.M.A.N.] [PATCHv3] " Antonio Quartulli
2011-05-30 21:37     ` [B.A.T.M.A.N.] [PATCHv4] " Antonio Quartulli
2011-05-30 23:25       ` [B.A.T.M.A.N.] [PATCHv5 1/2] " Antonio Quartulli
2011-06-04 16:36         ` [B.A.T.M.A.N.] [PATCHv6 " Antonio Quartulli
2011-06-05 20:08           ` Marek Lindner
2011-06-04 16:36         ` [B.A.T.M.A.N.] [PATCHv6 2/2] batman-adv: rename and move TT_* flags/structs to the proper locations Antonio Quartulli
2011-06-05 20:27           ` Marek Lindner
2011-05-30 23:25       ` [B.A.T.M.A.N.] [PATCHv5 " Antonio Quartulli
2011-06-01  5:41         ` Andrew Lunn
2011-06-01  5:34     ` Andrew Lunn [this message]
2011-06-01  6:19       ` [B.A.T.M.A.N.] [PATCHv3] batman-adv: modify TT_RESPONSE-full-table format 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=20110601053425.GA27695@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=lindner_marek@yahoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox