removed badmalloc (thx for the pointer to Uriel)
This commit is contained in:
		
							parent
							
								
									8c334ee078
								
							
						
					
					
						commit
						6a3ae5e26a
					
				
							
								
								
									
										12
									
								
								util.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								util.c
									
									
									
									
									
								
							| @ -9,14 +9,6 @@ | |||||||
| #include <sys/wait.h> | #include <sys/wait.h> | ||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
| 
 | 
 | ||||||
| /* static */ |  | ||||||
| 
 |  | ||||||
| static void |  | ||||||
| badmalloc(unsigned int size) |  | ||||||
| { |  | ||||||
| 	eprint("fatal: could not malloc() %u bytes\n", size); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /* extern */ | /* extern */ | ||||||
| 
 | 
 | ||||||
| void * | void * | ||||||
| @ -25,7 +17,7 @@ emallocz(unsigned int size) | |||||||
| 	void *res = calloc(1, size); | 	void *res = calloc(1, size); | ||||||
| 
 | 
 | ||||||
| 	if(!res) | 	if(!res) | ||||||
| 		badmalloc(size); | 		eprint("fatal: could not malloc() %u bytes\n", size); | ||||||
| 	return res; | 	return res; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -45,7 +37,7 @@ erealloc(void *ptr, unsigned int size) | |||||||
| { | { | ||||||
| 	void *res = realloc(ptr, size); | 	void *res = realloc(ptr, size); | ||||||
| 	if(!res) | 	if(!res) | ||||||
| 		badmalloc(size); | 		eprint("fatal: could not malloc() %u bytes\n", size); | ||||||
| 	return res; | 	return res; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Anselm R. Garbe
						Anselm R. Garbe