mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-10-31 21:27:30 +01:00 
			
		
		
		
	main: remove unneeded stat call
Static analysis flagged that 'path' was never being checked (which should not ever be NULL) but during that review I noticed stat() was being called, then fstat afterwards.
This commit is contained in:
		
							parent
							
								
									cd3857f810
								
							
						
					
					
						commit
						5ca7948dfb
					
				| @ -429,11 +429,6 @@ static bool setup_system_key(void) | ||||
| 
 | ||||
| 	path = l_strdup_printf("%s/%s", cred_dir, key_id); | ||||
| 
 | ||||
| 	if (stat(path, &st) < 0) { | ||||
| 		l_warn("SystemdEncrypt: Could not stat %s", path); | ||||
| 		return false; | ||||
| 	} | ||||
| 
 | ||||
| 	fd = open(path, O_RDONLY, 0); | ||||
| 	if (fd < 0) { | ||||
| 		l_warn("SystemdEncrypt: Cannot open secret: %s (%d)", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 James Prestwood
						James Prestwood