Re: Check connect address in NETLINK
From: David S. Miller <hidden>
Date: 2004-06-30 22:36:06
From: David S. Miller <hidden>
Date: 2004-06-30 22:36:06
Why don't you combine the two "ERR_PTR(-ECONNREFUSED)" tests
into one test like:
if ((nlk->pid == 0 && !nlk->data_ready) ||
(sock->sk_state == NELTINK_CONNECTED &&
nlk->dst_pid != nlk_sk(ssk)->pid)) {
sock_put(sock);
return ERR_PTR(-ECONNREFUSED);
}
so we don't have two copies of the "sock_put(); return ERR_PTR()"
thing emitted by the compiler?