[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170818092545.1aabc809@xeon-e3>
Date: Fri, 18 Aug 2017 09:25:45 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Phil Sutter <phil@....cc>
Cc: netdev@...r.kernel.org
Subject: Re: [iproute PATCH v2 3/5] tc/q_netem: Don't dereference possibly
NULL pointer
On Thu, 17 Aug 2017 19:09:29 +0200
Phil Sutter <phil@....cc> wrote:
> @@ -546,6 +546,8 @@ static int netem_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
> if (opt == NULL)
> return 0;
>
> + len = RTA_PAYLOAD(opt) - sizeof(qopt);
> +
> if (len < 0) {
Dont add blank line between computation and conditional.
Having them together reads better.
Powered by blists - more mailing lists