virsh: delete vsh[CM]alloc

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Ján Tomko 2020-10-05 18:43:25 +02:00
parent 504913bf23
commit 1647e376e8
2 changed files with 0 additions and 24 deletions

View File

@ -100,24 +100,6 @@ vshPrettyCapacity(unsigned long long val, const char **unit)
}
void *
_vshMalloc(vshControl *ctl, size_t size, const char *filename, int line)
{
char *x;
if (VIR_ALLOC_N(x, size) == 0)
return x;
vshError(ctl, _("%s: %d: failed to allocate %d bytes"),
filename, line, (int) size);
exit(EXIT_FAILURE);
}
void *
vshCalloc(vshControl *ctl G_GNUC_UNUSED, size_t nmemb, size_t size)
{
return g_malloc0_n(nmemb, size);
}
int
vshNameSorter(const void *a, const void *b)
{

View File

@ -465,12 +465,6 @@ char * vshReadline(vshControl *ctl, const char *prompt);
void vshReadlineHistoryAdd(const char *cmd);
/* allocation wrappers */
void *_vshMalloc(vshControl *ctl, size_t sz, const char *filename, int line);
#define vshMalloc(_ctl, _sz) _vshMalloc(_ctl, _sz, __FILE__, __LINE__)
void *vshCalloc(vshControl *ctl, size_t nmemb, size_t sz);
/* Macros to help dealing with mutually exclusive options. */
/* VSH_EXCLUSIVE_OPTIONS_EXPR: