Refactor entropy.c
This commit is contained in:
		
				
					committed by
					
						
						Aaron Marcher
					
				
			
			
				
	
			
			
			
						parent
						
							3f45a5f7ca
						
					
				
				
					commit
					951ea4e304
				
			@@ -9,9 +9,12 @@
 | 
			
		||||
	{
 | 
			
		||||
		int num;
 | 
			
		||||
 | 
			
		||||
		return (pscanf("/proc/sys/kernel/random/entropy_avail",
 | 
			
		||||
		               "%d", &num) == 1) ?
 | 
			
		||||
		       bprintf("%d", num) : NULL;
 | 
			
		||||
		if (pscanf("/proc/sys/kernel/random/entropy_avail",
 | 
			
		||||
		           "%d", &num) != 1) {
 | 
			
		||||
			return NULL;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		return bprintf("%d", num);
 | 
			
		||||
	}
 | 
			
		||||
#elif defined(__OpenBSD__)
 | 
			
		||||
	const char *
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user