Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- tools/vsh.c | 18 ------------------ tools/vsh.h | 6 ------ 2 files changed, 24 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 98066d17bf..ca92bcd78c 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -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) { diff --git a/tools/vsh.h b/tools/vsh.h index 0a40995bf5..5583fef9cc 100644 --- a/tools/vsh.h +++ b/tools/vsh.h @@ -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: -- 2.26.2