diff options
author | Hema Prathaban <hemaklnce@gmail.com> | 2014-08-17 00:27:48 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-08-17 09:46:40 -0700 |
commit | 74bb9d4fef9ff789094e85ee1324616611d77baa (patch) | |
tree | 11eea8b7a620b8cf09b1c2c1408a76ff76ffa720 /drivers | |
parent | 21aef7d9d654416b8167ad8047a628d3968a97da (diff) |
staging: lustre: lustre: libcfs: do not use assignment in if condition
This patch fixes the following error using checkpatch.pl
Error: do not use assignment in if condition
Signed-off-by: Hema Prathaban <hemaklnce@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/lustre/lustre/libcfs/debug.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c index 6b584698d3ae..e86b28d2cb03 100644 --- a/drivers/staging/lustre/lustre/libcfs/debug.c +++ b/drivers/staging/lustre/lustre/libcfs/debug.c @@ -314,9 +314,8 @@ libcfs_debug_str2mask(int *mask, const char *str, int is_subsys) if (!isspace(str[n-1])) break; matched = n; - - if ((t = sscanf(str, "%i%n", &m, &matched)) >= 1 && - matched == n) { + t = sscanf(str, "%i%n", &m, &matched); + if (t >= 1 && matched == n) { /* don't print warning for lctl set_param debug=0 or -1 */ if (m != 0 && m != -1) CWARN("You are trying to use a numerical value for the " |