aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libnl/libnl/fix-lib-cache_mngr.c-two-parentheses-bugs.patch
blob: 6b8fa106ca001e3ccb4153cf2d644af45cf7a8a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 82fdf49c185fd5f3810781af9ef52aa6a52bf2df Mon Sep 17 00:00:00 2001
From: "Song.Li" <Song.Li@windriver.com>
Date: Thu, 28 Jun 2012 20:03:17 +0800
Subject: [PATCH] fix lib/cache_mngr.c two parentheses bugs

there are two parentheses bugs in libnl /lib/cache_mngr.c file.
The parentheses doesn't make any sense,
This will cause the variable err get a bool value,
the correct value of variable err should be the return value
of the function which can be any integer value.

---
 lib/cache_mngr.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Upstream-status: Pending

diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c
index dae8768..57cc1f9 100644
--- a/lib/cache_mngr.c
+++ b/lib/cache_mngr.c
@@ -150,10 +150,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;
 
 	NL_DBG(1, "Allocated cache manager %p, protocol %d, %d caches\n",
-- 
1.7.9.5