chiark
/
gitweb
/
~mdw
/
secnet
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c9c047d
)
netlink: Use MIN rather than ?:
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 3 Oct 2014 20:16:49 +0000
(21:16 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 21 Oct 2014 00:07:09 +0000
(
01:07
+0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
netlink.c
patch
|
blob
|
blame
|
history
diff --git
a/netlink.c
b/netlink.c
index e197e80f8c69508f5f617d9af86b1bfa07957098..601686425124cb7d7bb46cb03500f9df75e7c909 100644
(file)
--- a/
netlink.c
+++ b/
netlink.c
@@
-386,7
+386,7
@@
static uint16_t netlink_icmp_reply_len(struct buffer_if *buf)
/* We include the first 8 bytes of the packet data, provided they exist */
hlen+=8;
plen=ntohs(iph->tot_len);
/* We include the first 8 bytes of the packet data, provided they exist */
hlen+=8;
plen=ntohs(iph->tot_len);
- return
(hlen>plen?plen:h
len);
+ return
MIN(hlen,p
len);
}
/* client indicates where the packet we're constructing a response to
}
/* client indicates where the packet we're constructing a response to