lib: posix: Explicitly ignoring return of memcpy

According with MISRA-C the value returned by a non-void function has
to be used. As memcpy return is almost useless, we are explicitly
ignoring it.

MISRA-C rule 17.7

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-12-18 12:15:54 -08:00 committed by Carles Cufí
commit 17c7db6bbe
2 changed files with 2 additions and 2 deletions

View file

@ -250,7 +250,7 @@ struct dirent *readdir(DIR *dirp)
rc = strlen(fdirent.name);
rc = (rc < PATH_MAX) ? rc : (PATH_MAX - 1);
memcpy(pdirent.d_name, fdirent.name, rc);
(void)memcpy(pdirent.d_name, fdirent.name, rc);
/* Make sure the name is NULL terminated */
pdirent.d_name[rc] = '\0';