tcp_metrics: dumb bug

2 messages, 2 authors, 2012-10-31 · open the first message on its own page

tcp_metrics: dumb bug

From: Stephen Hemminger <hidden>
Date: 2012-10-30 16:00:13

https://bugzilla.kernel.org/show_bug.cgi?id=49171

Description From David Binderman 2012-10-21 10:31:05 (-) [reply]
The source code is

        if (nla_len(a) != sizeof(sizeof(struct in6_addr)))

I'm surprised that compiles. Suggest remove one of the sizeofs.

Re: tcp_metrics: dumb bug

From: David Miller <davem@davemloft.net>
Date: 2012-10-31 16:46:42

From: Stephen Hemminger <redacted>
Date: Tue, 30 Oct 2012 08:59:20 -0700
https://bugzilla.kernel.org/show_bug.cgi?id=49171

Description From David Binderman 2012-10-21 10:31:05 (-) [reply]
The source code is

        if (nla_len(a) != sizeof(sizeof(struct in6_addr)))

I'm surprised that compiles. Suggest remove one of the sizeofs.
sizeof() resolves to a size_t value so... :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help