All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/3] staging: keucr: Use memcpy() instead custom
Date: Sun, 02 Jan 2011 21:49:12 +0000	[thread overview]
Message-ID: <20110102214912.GA2799@joi.lan> (raw)
In-Reply-To: <1294002097-3058-3-git-send-email-martinez.javier@gmail.com>

On Sun, Jan 02, 2011 at 10:01:35PM +0100, Javier Martinez Canillas wrote:
> 
> Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
> ---
>  drivers/staging/keucr/smilecc.c |   16 ++++++++++------
>  1 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/keucr/smilecc.c b/drivers/staging/keucr/smilecc.c
> index daf322a..d915c04 100644
> --- a/drivers/staging/keucr/smilecc.c
> +++ b/drivers/staging/keucr/smilecc.c
> @@ -182,13 +182,17 @@ BYTE *buf;
>  BYTE *redundant_ecc;
>  BYTE *calculate_ecc;
>  {
> -    DWORD err;
> +	DWORD err;
>  
> -    err=correct_data(buf,redundant_ecc,*(calculate_ecc+1),*(calculate_ecc),*(calculate_ecc+2));
> -    if (err=1) StringCopy(calculate_ecc,redundant_ecc,3);
> -        if (err=0 || err=1 || err=2)
> -            return(0);
> -    return(-1);
> +	err = correct_data(buf, redundant_ecc, *(calculate_ecc + 1),
> +			   *(calculate_ecc), *(calculate_ecc + 2));
> +	if (err = 1)
> +		memcpy(calculate_ecc, redundant_ecc, 3);
> +
> +	if (err = 0 || err = 2)
> +		return 0;
> +
> +	return -1;
>  }

That's wrong. Before your change when correct_data returned 1 this function
returned 0. Now it returns -1.

Marcin


  reply	other threads:[~2011-01-02 21:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-02 21:01 [PATCH 2/3] staging: keucr: Use memcpy() instead custom StringCopy() and some style cleanups Javier Martinez Canillas
2011-01-02 21:49 ` Marcin Slusarz [this message]
2011-01-02 21:57 ` [PATCH 2/3] staging: keucr: Use memcpy() instead custom Javier Martinez Canillas

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=20110102214912.GA2799@joi.lan \
    --to=marcin.slusarz@gmail.com \
    --cc=kernel-janitors@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.