mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:52:45 +00:00 
			
		
		
		
	Kernel+LibC: Pack SC_inode_watcher_add_watch_params struct better
Flagged by pvs-studio, ordering the members from largest to smallest allows us to save a few bytes in the size of the struct.
This commit is contained in:
		
							parent
							
								
									dba5710efa
								
							
						
					
					
						commit
						b45ca5d56e
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -474,8 +474,8 @@ struct SC_set_coredump_metadata_params { | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| struct SC_inode_watcher_add_watch_params { | struct SC_inode_watcher_add_watch_params { | ||||||
|     int fd; |  | ||||||
|     StringArgument user_path; |     StringArgument user_path; | ||||||
|  |     int fd; | ||||||
|     u32 event_mask; |     u32 event_mask; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -32,7 +32,7 @@ int create_inode_watcher(unsigned flags) | ||||||
| 
 | 
 | ||||||
| int inode_watcher_add_watch(int fd, const char* path, size_t path_length, unsigned event_mask) | int inode_watcher_add_watch(int fd, const char* path, size_t path_length, unsigned event_mask) | ||||||
| { | { | ||||||
|     Syscall::SC_inode_watcher_add_watch_params params { fd, { path, path_length }, event_mask }; |     Syscall::SC_inode_watcher_add_watch_params params { { path, path_length }, fd, event_mask }; | ||||||
|     int rc = syscall(SC_inode_watcher_add_watch, ¶ms); |     int rc = syscall(SC_inode_watcher_add_watch, ¶ms); | ||||||
|     __RETURN_WITH_ERRNO(rc, rc, -1); |     __RETURN_WITH_ERRNO(rc, rc, -1); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brian Gianforcaro
						Brian Gianforcaro