pkarashchenko commented on a change in pull request #5856:
URL: https://github.com/apache/incubator-nuttx/pull/5856#discussion_r835788030
##########
File path: fs/rpmsgfs/rpmsgfs_client.c
##########
@@ -727,11 +727,13 @@ int rpmsgfs_client_rename(FAR void *handle, FAR const
char *oldpath,
size_t len;
size_t oldlen;
size_t newlen;
+ size_t alignlen;
uint32_t space;
- oldlen = strlen(oldpath) + 1;
- newlen = strlen(newpath) + 1;
- len = sizeof(*msg) + oldlen + newlen;
+ oldlen = strlen(oldpath) + 1;
+ alignlen = (oldlen + 0x7) & ~0x7;
Review comment:
`ALIGN_UP` is not a standard macro as well as `ARRAY_SIZE`, so usually
it is defined in each place individually. If the align up logic is used more
than once in the file maybe it is reasonable to add a macro
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]