summaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.c
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-12-31 18:59:33 +0000
committerDavid S. Miller <davem@davemloft.net>2011-01-01 13:57:56 -0800
commit2db9983a4318818845193bd577879c0620705e82 (patch)
treea77ed030edde71edb1c1b781f580cdfd642ac70d /net/tipc/bearer.c
parent0e65967e33be61e5f67727edd4ea829b47676fc0 (diff)
downloadop-kernel-dev-2db9983a4318818845193bd577879c0620705e82.zip
op-kernel-dev-2db9983a4318818845193bd577879c0620705e82.tar.gz
tipc: split variable assignments out of conditional expressions
Cleans up TIPC's source code to eliminate assigning values to variables within conditional expressions, improving code readability and reducing warnings from various code checker tools. These changes are purely cosmetic and do not alter the operation of TIPC in any way. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r--net/tipc/bearer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 040f3ed..e9136f0 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -251,7 +251,8 @@ static int bearer_name_validate(const char *name,
/* ensure all component parts of bearer name are present */
media_name = name_copy;
- if ((if_name = strchr(media_name, ':')) == NULL)
+ if_name = strchr(media_name, ':');
+ if (if_name == NULL)
return 0;
*(if_name++) = 0;
media_len = if_name - media_name;
OpenPOWER on IntegriCloud