[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1317308040.2676.124.camel@smile>
Date: Thu, 29 Sep 2011 17:54:00 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
linux-kernel@...r.kernel.org,
Denys Vlasenko <vda.linux@...glemail.com>
Subject: Re: [PATCHv2] fat: don't use custom hex_to_bin()
On Thu, 2011-09-29 at 23:43 +0900, OGAWA Hirofumi wrote:
> I guess you just did copy&paste. "u8 uc[2];" part should be before
> statement as C90.
>
> I.e.
>
> if (escape && (*ip == ':')) {
> u8 uc[2];
>
> if (i > len - 5)
> return -EINVAL;
>
> if (hex2bin(uc, ip + 1, 2) < 0)
> return -EINVAL;
> *(wchar_t *)op = uc[0] << 8 | uc[1];
Actually, why do not use
*(wchar_t *)op++ = ...
instead of additional op+=2?
>
> op += 2;
> ip += 5;
> i += 5;
> } else {
>
> This should be work?
Oh, my bad! So much minor mistakes last time. Really need vacation.
--
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists