fix: noconfirm auto-selects first AUR match
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#include <config.h>
|
||||
#undef realloc
|
||||
#undef malloc
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
void * rpl_realloc (void *p, size_t n)
|
||||
{
|
||||
void *result;
|
||||
|
||||
if (n == 0)
|
||||
{
|
||||
n = 1;
|
||||
}
|
||||
|
||||
if (p == NULL)
|
||||
{
|
||||
result = malloc (n);
|
||||
}
|
||||
else
|
||||
result = realloc (p, n);
|
||||
|
||||
if (result == NULL)
|
||||
errno = ENOMEM;
|
||||
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user