From b35adb383697da37df7130a015cee533ad804642 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 9 Mar 2007 13:44:24 +0000 Subject: [PATCH] * src/virsh.c: bad pointer/int mismatch fixes from Richard Jones daniel --- ChangeLog | 4 ++++ src/virsh.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d825e56213..7d42b10068 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Mar 9 14:43:11 CET 2007 Daniel Veillard + + * src/virsh.c: bad pointer/int mismatch fixes from Richard Jones + Thu Mar 8 22:07:14 EST 2007 Daniel P. Berrange * qemud/conf.c: Fix double free in XML parsing routine diff --git a/src/virsh.c b/src/virsh.c index 445d3fb9ef..b146b97dcc 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -1957,15 +1957,16 @@ cmdNetworkList(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED) return FALSE; } if (maxactive) { - activeNames = vshMalloc(ctl, sizeof(int) * maxactive); + activeNames = vshMalloc(ctl, sizeof(char *) * maxactive); - if ((maxactive = virConnectListNetworks(ctl->conn, &activeNames[0], maxactive)) < 0) { + if ((maxactive = virConnectListNetworks(ctl->conn, activeNames, + maxactive)) < 0) { vshError(ctl, FALSE, _("Failed to list active networks")); free(activeNames); return FALSE; } - qsort(&activeNames[0], maxactive, sizeof(int), namesorter); + qsort(&activeNames[0], maxactive, sizeof(char *), namesorter); } } if (inactive) {