Re: [PATCH 10/36] tty/vt: consolemap: introduce UNI_*() macros

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

 



On 08. 06. 22, 10:02, Ilpo Järvinen wrote:
It doesn't raise any warnings if I do:

#define UNI_DIR_BITS           GENMASK(15, 11)

As UNI_DIRS is 32 it cannot ever be larger than that?

Right, conv_uni_to_pc() properly checks:
  if (ucs > 0xffff)
      return -4;
before
  dir = dict->uni_pgdir[UNI_DIR(ucs)];


Even better!

I also noted to my TODO to check why ucs is "long" there. It makes no sense at all. Be it negative, or long-sized. IMO, it should simply be u32.

There is so much crap in the code :/...

thanks,
--
js
suse labs



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux