On 09.02.2016 17:31, Samuel Thibault wrote: > Thomas Huth, on Tue 09 Feb 2016 17:14:15 +0100, wrote: >>> + return (a.s6_addr[prefix_len / 8] >> (8 - (prefix_len % 8))) >>> + == (b.s6_addr[prefix_len / 8] >> (8 - (prefix_len % 8))); >> >> checkpatch.pl complains here: >> >> ERROR: return is not a function, parentheses are not required > > This is a false positive, there are no outer parentheses here.
Ah, you're right, of course, I haven't looked closely enough, sorry. Maybe checkpatch.pl could also be silenced by putting the "==" at the end of the first line instead? >>> +static void icmp6_send_echoreply(struct mbuf *m, Slirp *slirp, struct ip6 >>> *ip, >>> + struct icmp6 *icmp) >>> +{ >>> + struct mbuf *t = m_get(slirp); >>> + t->m_len = sizeof(struct ip6) + ntohs(ip->ip_pl); >>> + memcpy(t->m_data, m->m_data, t->m_len); >>> + >>> + /* IPv6 Packet */ >>> + struct ip6 *rip = mtod(t, struct ip6 *); >> >> Not sure how strictly this is handled in QEMU, but for proper portable >> C, variables should be declared at the beginning of a scope, as far as I >> know. > > AIUI, qemu requires C99, doesn't it? Ok, you're right again, this is even declared in the HACKING file of QEMU, so this should be fine, I think. Thomas