All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	John Levon <john.levon@joyent.com>
Cc: smatch@vger.kernel.org
Subject: Re: [PATCH] check_all_func_returns: Fix a test against "vfprintf"
Date: Thu, 26 May 2022 14:56:58 +0300	[thread overview]
Message-ID: <20220526115658.GG2146@kadam> (raw)
In-Reply-To: <7f65bbf1d9bb030d3c40c0eb80068268ba46cd10.1653557599.git.christophe.jaillet@wanadoo.fr>

On Thu, May 26, 2022 at 11:33:30AM +0200, Christophe JAILLET wrote:
> 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@wanadoo.fr>
> ---
> Speculative. Un-tested.

Looks correct.  Applied.  This is for illumos, so I've added John to the
CC list.

regards,
dan carpenter

> ---
>  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

      reply	other threads:[~2022-05-26 11:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26  9:33 [PATCH] check_all_func_returns: Fix a test against "vfprintf" Christophe JAILLET
2022-05-26 11:56 ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220526115658.GG2146@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=john.levon@joyent.com \
    --cc=smatch@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.