Flagged by pvs-studio, ordering the members from largest to smallest allows us to save a few bytes in the size of the struct.
@@ -426,9 +426,9 @@ struct SC_rename_params {
};
struct SC_mount_params {
- int source_fd;
StringArgument target;
StringArgument fs_type;
+ int source_fd;
int flags;
@@ -723,9 +723,9 @@ int mount(int source_fd, const char* target, const char* fs_type, int flags)
}
Syscall::SC_mount_params params {
- source_fd,
{ target, strlen(target) },
{ fs_type, strlen(fs_type) },
+ source_fd,
flags
int rc = syscall(SC_mount, ¶ms);