mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 16:32:18 +01:00 
			
		
		
		
	GRand: Check return value of fopen directly
This doesn't fix anything, it should just silence some static analysis tools.
This commit is contained in:
		
				
					committed by
					
						 Matthias Clasen
						Matthias Clasen
					
				
			
			
				
	
			
			
			
						parent
						
							fd8056b532
						
					
				
				
					commit
					09aa6d3668
				
			| @@ -216,11 +216,10 @@ g_rand_new (void) | |||||||
|       FILE* dev_urandom; |       FILE* dev_urandom; | ||||||
|  |  | ||||||
|       do |       do | ||||||
|         { | 	{ | ||||||
| 	  errno = 0; |  | ||||||
| 	  dev_urandom = fopen("/dev/urandom", "rb"); | 	  dev_urandom = fopen("/dev/urandom", "rb"); | ||||||
| 	} | 	} | ||||||
|       while G_UNLIKELY (errno == EINTR); |       while G_UNLIKELY (dev_urandom == NULL && errno == EINTR); | ||||||
|  |  | ||||||
|       if (dev_urandom) |       if (dev_urandom) | ||||||
| 	{ | 	{ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user