]> git.baikalelectronics.ru Git - kernel.git/commit
socket: Tighten no-error check in bind()
authorJakub Sitnicki <jakub@cloudflare.com>
Thu, 4 Oct 2018 09:09:40 +0000 (11:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Oct 2018 21:34:45 +0000 (14:34 -0700)
commit333baefbe929fcf8d672205b277067ff940f02d8
treec1eb50ea94e8064bca08243b34d5eb319daa0c12
parent0dd5c193e8f1cba09e2e75a751c628d25ddc5f6f
socket: Tighten no-error check in bind()

move_addr_to_kernel() returns only negative values on error, or zero on
success. Rewrite the error check to an idiomatic form to avoid confusing
the reader.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/socket.c