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:
parent
8f3459b3db
commit
17c7db6bbe
2 changed files with 2 additions and 2 deletions
|
@ -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';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue