chao an
fb9b41221d
semantic/parser: fix compile warning found by sparse
...
Reference:
https://linux.die.net/man/1/sparse
Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-30 23:00:00 +08:00
anjiahao
d1d46335df
Replace nxsem API when used as a lock with nxmutex API
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
Xiang Xiao
01517b2ebe
libc/gettext: Support the plural format
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-08 15:57:25 -03:00
Xu Xingliang
f38783f4b5
libc/locale: check if mmap failed before proceeding.
...
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2022-03-08 15:57:25 -03:00
Petro Karashchenko
12b3491208
libc/textdomain: Fix error behaviour
...
- textdomain should set errno to ENOMEM in case if it is not
possible to store domainname
- fix buffer overflow in textdomain if domainname is a string
of NAME_MAX length
- improve textdomain error detection in case if domainname
points to non null terminated buffer
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-14 05:54:34 -06:00
Xiang Xiao
db6dd623c6
libc/gettextdomain: Fix the typo error
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-13 11:07:27 -06:00
Neo Xu
5941532fb5
libc/gettext: Initialize path field when creating mofile struct.
...
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2021-09-01 14:35:24 -03:00
Xiang Xiao
00e0afb864
libc/gettext: Change g_domain to array
...
otherwise textdomain will deference NULL pointer in the default case
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 09:41:30 -03:00
Xiang Xiao
c597721633
libc: Implement gettext function
...
https://www.man7.org/linux/man-pages/man3/dcgettext.3.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-03 12:14:07 -03:00