Remove mallocarray(...) and use reallocarray(NULL, ...)
After a short correspondence with Otto Moerbeek it turned out mallocarray() is only in the OpenBSD-Kernel, because the kernel- malloc doesn't have realloc. Userspace applications should rather use reallocarray with an explicit NULL-pointer. Assuming reallocarray() will become available in c-stdlibs in the next few years, we nip mallocarray() in the bud to allow an easy transition to a system-provided version when the day comes.
This commit is contained in:
		
							
								
								
									
										2
									
								
								util.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								util.h
									
									
									
									
									
								
							| @@ -25,8 +25,6 @@ void apathmax(char **, size_t *); | ||||
|  | ||||
| void *ecalloc(size_t, size_t); | ||||
| void *emalloc(size_t); | ||||
| void *mallocarray(size_t, size_t); | ||||
| void *emallocarray(size_t, size_t); | ||||
| void *erealloc(void *, size_t); | ||||
| void *reallocarray(void *, size_t, size_t); | ||||
| void *ereallocarray(void *, size_t, size_t); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user