public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
* Re: [PATCH v2 2/4] staging: speakup: use native error codes
       [not found] ` <1364461366-4939-2-git-send-email-andriy.shevchenko@linux.intel.com>
@    ` Samuel Thibault
  0 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @  UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: devel, Greg Kroah-Hartman, speakup

Andy Shevchenko, le Thu 28 Mar 2013 11:02:44 +0200, a écrit :
> The mapping as follows:
> 	E_RANGE		-> ERANGE
> 	E_UNDEF		-> ENODATA
> 	E_TOOLONG	-> E2BIG
> 	SET_DEFAULT	-> ERESTART
> 
> As a side effect it fixes a bug in spk_var_store() where return code was
> mistakenly compared to negative value instead of positive.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 3/4] staging: speakup: reuse native hex2bin()
       [not found] ` <1364461366-4939-3-git-send-email-andriy.shevchenko@linux.intel.com>
@    ` Samuel Thibault
       [not found]     ` <1365509589.6652.130.camel@smile>
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Thibault @  UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: devel, Greg Kroah-Hartman, speakup

Andy Shevchenko, le Thu 28 Mar 2013 11:02:45 +0200, a écrit :
> -		} else if (*p1 == 'x' &&
> -				strchr(hx, p1[1]) && strchr(hx, p1[2])) {
...
> -		} else
> -			*p++ = *p1++;
> +		} else {
> +			if (*p1 == 'x' && !hex2bin(&num, p1 + 1, 1)) {
...
> +			} else
> +				*p++ = *p1++;
> +		}

Why not keeping the same else if structure?  It looks nicer to me to
keep a series of else if.

> +			if (*p1 == 'x' && !hex2bin(&num, p1 + 1, 1)) {

Count should be 2, shouldn't it?

Samuel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 4/4] staging: speakup: fix a bug when translate octal numbers
       [not found] ` <1364461366-4939-4-git-send-email-andriy.shevchenko@linux.intel.com>
@    ` Samuel Thibault
  0 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @  UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: devel, Greg Kroah-Hartman, speakup

Andy Shevchenko, le Thu 28 Mar 2013 11:02:46 +0200, a écrit :
> There are actually overflow bug and typo. And bug was never happened due to the
> typo.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 3/4] staging: speakup: reuse native hex2bin()
       [not found]     ` <1365509589.6652.130.camel@smile>
@        ` Samuel Thibault
  0 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @  UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: devel, Greg Kroah-Hartman, speakup

Andy Shevchenko, le Tue 09 Apr 2013 15:13:09 +0300, a écrit :
> > > +			if (*p1 == 'x' && !hex2bin(&num, p1 + 1, 1)) {
> > 
> > Count should be 2, shouldn't it?
> 
> Actually, no. It means bytes in the result.

Ah, right.

> If I got it correctly the original code translates '\xNN' into NN which
> is exactly one byte.

Yes.

Samuel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~ UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1364461366-4939-1-git-send-email-andriy.shevchenko@linux.intel.com>
     [not found] ` <1364461366-4939-2-git-send-email-andriy.shevchenko@linux.intel.com>
   ` [PATCH v2 2/4] staging: speakup: use native error codes Samuel Thibault
     [not found] ` <1364461366-4939-3-git-send-email-andriy.shevchenko@linux.intel.com>
   ` [PATCH v2 3/4] staging: speakup: reuse native hex2bin() Samuel Thibault
     [not found]     ` <1365509589.6652.130.camel@smile>
       ` Samuel Thibault
     [not found] ` <1364461366-4939-4-git-send-email-andriy.shevchenko@linux.intel.com>
   ` [PATCH v2 4/4] staging: speakup: fix a bug when translate octal numbers Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).