cache_mngr: Fix assignment of error code in nl_cache_mngr_alloc()
In the current form, the parentheses in these two if (...) statements lead to err being assigned the result of nl_connect(...) < 0 and nl_socket_set_nonblocking(...) < 0 instead of the return value of these functions. Adjust the parentheses to assign the returned error code to err. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
8f82270cff
commit
b6cadfefab
1 changed files with 2 additions and 2 deletions
|
@ -165,10 +165,10 @@ int nl_cache_mngr_alloc(struct nl_sock *sk, int protocol, int flags,
|
|||
/* Required to receive async event notifications */
|
||||
nl_socket_disable_seq_check(mngr->cm_sock);
|
||||
|
||||
if ((err = nl_connect(mngr->cm_sock, protocol) < 0))
|
||||
if ((err = nl_connect(mngr->cm_sock, protocol)) < 0)
|
||||
goto errout;
|
||||
|
||||
if ((err = nl_socket_set_nonblocking(mngr->cm_sock) < 0))
|
||||
if ((err = nl_socket_set_nonblocking(mngr->cm_sock)) < 0)
|
||||
goto errout;
|
||||
|
||||
/* Create and allocate socket for sync cache fills */
|
||||
|
|
Loading…
Add table
Reference in a new issue