Powered by Linux
[PATCH] check_all_func_returns: Fix a test against "vfprintf" — Semantic Matching Tool

[PATCH] check_all_func_returns: Fix a test against "vfprintf"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is likely that a "== 0" is missing here, or the "if" will be always
true. In such a case, it would be easier to remove it altogether.

Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
Speculative. Un-tested.
---
 check_all_func_returns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/check_all_func_returns.c b/check_all_func_returns.c
index 1ff50433d57b..bd87e1adbc7a 100644
--- a/check_all_func_returns.c
+++ b/check_all_func_returns.c
@@ -55,7 +55,7 @@ static void check_func_return(struct expression *expr)
 	if (strcmp(func, "printf") == 0 || strcmp(func, "vprintf") == 0)
 		return;
 
-	if (strcmp(func, "fprintf") == 0 || strcmp(func, "vfprintf")) {
+	if (strcmp(func, "fprintf") == 0 || strcmp(func, "vfprintf") == 0) {
 		const char *arg0 = expr_to_str(get_argument_from_call_expr(expr->args, 0));
 
 		if (arg0 != NULL &&
-- 
2.34.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux