mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:42:44 +00:00 
			
		
		
		
	Tests/Kernel: Remove redundant if (#4111)
				
					
				
			Problem: - If `fork()` fails the system tries to call `execl()`. That will either succeed and replace the running process image or it will fail and it needs to try again. The `if` is redundant because it will only be evaluated if `execl()` fails. Solution: - Remove the `if`.
This commit is contained in:
		
							parent
							
								
									b9bbf377d6
								
							
						
					
					
						commit
						a34939bcd5
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		|  | @ -151,8 +151,7 @@ int main() | |||
|         if (!fork()) { | ||||
|         try_again: | ||||
|             printf("exec\n"); | ||||
|             if (execl(path, "x", nullptr) < 0) { | ||||
|             } | ||||
|             execl(path, "x", nullptr); | ||||
|             goto try_again; | ||||
|         } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lenny Maiorani
						Lenny Maiorani