On Tue, 2017-08-01 at 03:40 +0900, OGAWA Hirofumi wrote:
> Andy Shevchenko <[email protected]> writes:
> 
> > We may use hex2bin() instead of custom approach.
> > 
> > Signed-off-by: Andy Shevchenko <[email protected]>
> 
> 
> 

> > +                           fill = hex2bin(hc, ip + 1, 2);
> > +                           if (fill)
> > +                                   return fill;
> 
> This should not use random errno (in this case, it is -1 (EPERM)).

You perhaps missed the side note I put after --- line.
It reflects this change.

> 
> > +                           *op++ = hc[1];
> > +                           *op++ = hc[0];
> 
> Maybe, originally endian bug?

No problem reported. And as you noticed quite ago it is __be16
originally as it goes hi-lo.

-- 
Andy Shevchenko <[email protected]>
Intel Finland Oy

Reply via email to