[PATCH v2 3/4] staging: speakup: reuse native hex2bin()

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

 



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


[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux