mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
libc/gettext: Initialize path field when creating mofile struct.
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
committed by
Gustavo Henrique Nihei
parent
98c30c2f7e
commit
5941532fb5
@@ -312,6 +312,7 @@ FAR char *dcngettext(FAR const char *domainname,
|
||||
return notrans;
|
||||
}
|
||||
|
||||
strlcpy(mofile->path, path, PATH_MAX);
|
||||
mofile->map = momap(path, &mofile->size);
|
||||
if (mofile->map == MAP_FAILED)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user