diff options
author | Allan Stephens <Allan.Stephens@windriver.com> | 2010-12-31 18:59:33 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-01 13:57:56 -0800 |
commit | 2db9983a4318818845193bd577879c0620705e82 (patch) | |
tree | a77ed030edde71edb1c1b781f580cdfd642ac70d /net/tipc/bearer.c | |
parent | 0e65967e33be61e5f67727edd4ea829b47676fc0 (diff) | |
download | linux-2db9983a4318818845193bd577879c0620705e82.tar.gz linux-2db9983a4318818845193bd577879c0620705e82.tar.bz2 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.c | 3 |
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; |