mirror of
https://github.com/apache/nuttx.git
synced 2026-10-09 23:35:47 +00:00
libc/gettext: Initialize path field when creating mofile struct.
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com> Change-Id: Ic88876b254e29ac6156f8b2b15c5321af62f4e24
This commit is contained in:
parent
5e8b1fba63
commit
e42c3ea8a8
1 changed files with 1 additions and 0 deletions
|
|
@ -312,6 +312,7 @@ FAR char *dcngettext(FAR const char *domainname,
|
|||
return notrans;
|
||||
}
|
||||
|
||||
strncpy(mofile->path, path, PATH_MAX);
|
||||
mofile->map = momap(path, &mofile->size);
|
||||
if (mofile->map == MAP_FAILED)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue