On Sun, Dec 6, 2015 at 2:05 AM, Rasmus Villemoes
wrote:
> If char is signed and ch happens to be negative, printing ch with
> "%02x" will not do as intended (when ch is -19, one will get
> "ffed"). Fix that by masking with 0xff.
>
> Signed-off-by: Rasmus Villemoes
On Sun, 2015-12-06 at 01:21 +0100, Rasmus Villemoes wrote:
> On Sun, Dec 06 2015, Joe Perches wrote:
>
> > On Sun, 2015-12-06 at 01:05 +0100, Rasmus Villemoes wrote:
> > > If char is signed and ch happens to be negative, printing ch with
> > > "%02x" will not do as intended
If char is signed and ch happens to be negative, printing ch with
"%02x" will not do as intended (when ch is -19, one will get
"ffed"). Fix that by masking with 0xff.
Signed-off-by: Rasmus Villemoes
---
drivers/staging/speakup/kobjects.c | 2 +-
1 file changed, 1
On Sun, 2015-12-06 at 01:05 +0100, Rasmus Villemoes wrote:
> If char is signed and ch happens to be negative, printing ch with
> "%02x" will not do as intended (when ch is -19, one will get
> "ffed"). Fix that by masking with 0xff.
I presume there are a lot of these in the kernel.
Did you use
On Sun, Dec 06 2015, Joe Perches wrote:
> On Sun, 2015-12-06 at 01:05 +0100, Rasmus Villemoes wrote:
>> If char is signed and ch happens to be negative, printing ch with
>> "%02x" will not do as intended (when ch is -19, one will get
>> "ffed"). Fix that by masking with