Re: [Libvir] [PATCH] avoid problems with sign-extended "char" operand to is* functions

2008-04-25 Thread Daniel Veillard
On Thu, Apr 24, 2008 at 10:01:10PM +0200, Jim Meyering wrote: > I spotted this in existing code while doing a review: > These uses all cause trouble if the byte in question has a value > larger than 127 and the "char" type is signed. > > avoid problems with sign-extended "char" operand to is

Re: [Libvir] [PATCH] avoid problems with sign-extended "char" operand to is* functions

2008-04-24 Thread Daniel P. Berrange
On Thu, Apr 24, 2008 at 10:01:10PM +0200, Jim Meyering wrote: > I spotted this in existing code while doing a review: > These uses all cause trouble if the byte in question has a value > larger than 127 and the "char" type is signed. Looks fine by me. Dan. -- |: Red Hat, Engineering, Boston -o

[Libvir] [PATCH] avoid problems with sign-extended "char" operand to is* functions

2008-04-24 Thread Jim Meyering
I spotted this in existing code while doing a review: These uses all cause trouble if the byte in question has a value larger than 127 and the "char" type is signed. avoid problems with sign-extended "char" operand to is* functions * src/util.h (to_uchar): Define function.