Search Linux Wireless

[PATCH 3/4] iw: Static analyser report that attr may be NULL so either we can remove condition check statement or add goto at end of this function.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johannes,

Subject: [PATCH 3/4] iw: Static analyser report that attr may be NULL so
 either we can remove condition check statement or add goto at end of this
 function.

Signed-off-by: Amit Khatri <amit.khatri@xxxxxxxxxxx>
Signed-off-by: Rahul Jain <rahul.jain@xxxxxxxxxxx>
---
 event.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/event.c b/event.c
index f73e078..06d236b 100644
--- a/event.c
+++ b/event.c
@@ -49,8 +49,10 @@ static void print_frame(struct print_event_args *args, struct nlattr *attr)
 	char macbuf[6*3];
 	uint16_t tmp;
 
-	if (!attr)
+	if (!attr) {
 		printf(" [no frame]");
+		goto out;
+	}
 
 	frame = nla_data(attr);
 	len = nla_len(attr);
@@ -97,6 +99,8 @@ static void print_frame(struct print_event_args *args, struct nlattr *attr)
 	for (i = 0; i < len; i++)
 		printf(" %.02x", frame[i]);
 	printf("]");
+ out:
+	;  /*empty statement to avoid compiler error */
 }
 
 static void parse_cqm_event(struct nlattr **attrs)
-- 
1.9.1��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux