Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1478870 > unrolled thread

[PATCH] net: x25: remove null checks on arrays calling_ae and called_ae

Started byColin King <colin.king@canonical.com>
First post2016-09-08 09:50 +0200
Last post2016-09-08 09:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] net: x25: remove null checks on arrays calling_ae and called_ae Colin King <colin.king@canonical.com> - 2016-09-08 09:50 +0200

#1478870 — [PATCH] net: x25: remove null checks on arrays calling_ae and called_ae

FromColin King <colin.king@canonical.com>
Date2016-09-08 09:50 +0200
Subject[PATCH] net: x25: remove null checks on arrays calling_ae and called_ae
Message-ID<sf2fU-2RT-7@gated-at.bofh.it>
From: Colin Ian King <colin.king@canonical.com>

dtefacs.calling_ae and called_ae are both 20 element __u8 arrays and
cannot be null and hence are redundant checks. Remove these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 net/x25/af_x25.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index a750f33..f83b74d 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -1500,12 +1500,8 @@ out_fac_release:
 			goto out_dtefac_release;
 		if (dtefacs.calling_len > X25_MAX_AE_LEN)
 			goto out_dtefac_release;
-		if (dtefacs.calling_ae == NULL)
-			goto out_dtefac_release;
 		if (dtefacs.called_len > X25_MAX_AE_LEN)
 			goto out_dtefac_release;
-		if (dtefacs.called_ae == NULL)
-			goto out_dtefac_release;
 		x25->dte_facilities = dtefacs;
 		rc = 0;
 out_dtefac_release:
-- 
2.9.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web