netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Thomas Graf <tgraf@suug.ch>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH] PKT_SCHED: validate policer configuration TLVs
Date: Tue, 7 Dec 2004 21:32:34 -0800	[thread overview]
Message-ID: <20041207213234.257fd0d9.davem@davemloft.net> (raw)
In-Reply-To: <20041207172349.GG1371@postel.suug.ch>

On Tue, 7 Dec 2004 18:23:49 +0100
Thomas Graf <tgraf@suug.ch> wrote:

> Adds TLV size sanity checks for policer configuration. 

Hmmm...

> -	if (tb[TCA_POLICE_RESULT-1])
> +	if (tb[TCA_POLICE_RESULT-1]) {
> +		if (RTA_PAYLOAD(tb[TCA_POLICE_RESULT-1]) != sizeof(u32))
> +			goto failure;
>  		p->result = *(int*)RTA_DATA(tb[TCA_POLICE_RESULT-1]);
> +	}

Either these things are int's or u32's, they cannot be both :-)
I know that size wise it's identical, but at least make the code
look consistent.

  reply	other threads:[~2004-12-08  5:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-07 17:23 [PATCH] PKT_SCHED: validate policer configuration TLVs Thomas Graf
2004-12-08  5:32 ` David S. Miller [this message]
2004-12-08 20:39   ` Thomas Graf
2004-12-28  2:34     ` David S. Miller

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=20041207213234.257fd0d9.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@oss.sgi.com \
    --cc=tgraf@suug.ch \
    /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;
as well as URLs for NNTP newsgroup(s).