summaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.c
diff options
context:
space:
mode:
authorAllan Stephens2010-12-31 19:59:33 +0100
committerDavid S. Miller2011-01-01 22:57:56 +0100
commit2db9983a4318818845193bd577879c0620705e82 (patch)
treea77ed030edde71edb1c1b781f580cdfd642ac70d /net/tipc/bearer.c
parenttipc: cleanup various cosmetic whitespace issues (diff)
downloadkernel-qcow2-linux-2db9983a4318818845193bd577879c0620705e82.tar.gz
kernel-qcow2-linux-2db9983a4318818845193bd577879c0620705e82.tar.xz
kernel-qcow2-linux-2db9983a4318818845193bd577879c0620705e82.zip
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 040f3ed32ec8..e9136f0abe60 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;