staging: lustre: lustre: libcfs: do not use assignment in if condition
authorHema Prathaban <hemaklnce@gmail.com>
Sat, 16 Aug 2014 18:57:48 +0000 (00:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Aug 2014 16:46:40 +0000 (09:46 -0700)
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>
drivers/staging/lustre/lustre/libcfs/debug.c

index 6b584698d3aeaf1cb72856b37f18af9f67b59b85..e86b28d2cb03205ab3089f0dd88b840ab6d4b313 100644 (file)
@@ -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 "
This page took 0.025635 seconds and 5 git commands to generate.