mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
maint: avoid 'const fooPtr' in all remaining places
'const fooPtr' is the same as 'foo * const' (the pointer won't change, but it's contents can). But in general, if an interface is trying to be const-correct, it should be using 'const foo *' (the pointer is to data that can't be changed). Fix up all remaining offenders. * src/lxc/lxc_process.c (virLXCProcessSetupInterfaceBridged): Drop needless const. * src/uml/uml_driver.c (umlMonitorCommand): Use intended type. (umlMonitorAddress): Fix fallout. * src/xen/xm_internal.c (xenXMDomainSearchForUUID): Use intended type. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
9a520a591d
commit
33aec50684
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2012 Red Hat, Inc.
|
||||
* Copyright (C) 2010-2013 Red Hat, Inc.
|
||||
* Copyright IBM Corp. 2008
|
||||
*
|
||||
* lxc_process.c: LXC process lifecycle management
|
||||
@ -246,7 +246,7 @@ char *virLXCProcessSetupInterfaceBridged(virConnectPtr conn,
|
||||
char *ret = NULL;
|
||||
char *parentVeth;
|
||||
char *containerVeth = NULL;
|
||||
const virNetDevVPortProfilePtr vport = virDomainNetGetActualVirtPortProfile(net);
|
||||
virNetDevVPortProfilePtr vport = virDomainNetGetActualVirtPortProfile(net);
|
||||
|
||||
VIR_DEBUG("calling vethCreate()");
|
||||
parentVeth = net->ifname;
|
||||
|
@ -141,7 +141,7 @@ static void umlShutdownVMDaemon(struct uml_driver *driver,
|
||||
|
||||
|
||||
static int umlMonitorCommand(const struct uml_driver *driver,
|
||||
const virDomainObjPtr vm,
|
||||
const virDomainObj *vm,
|
||||
const char *cmd,
|
||||
char **reply);
|
||||
|
||||
@ -836,8 +836,9 @@ reopen:
|
||||
}
|
||||
|
||||
static int umlMonitorAddress(const struct uml_driver *driver,
|
||||
virDomainObjPtr vm,
|
||||
struct sockaddr_un *addr) {
|
||||
const virDomainObj *vm,
|
||||
struct sockaddr_un *addr)
|
||||
{
|
||||
char *sockname;
|
||||
int retval = 0;
|
||||
|
||||
@ -918,7 +919,7 @@ struct monitor_response {
|
||||
|
||||
|
||||
static int umlMonitorCommand(const struct uml_driver *driver,
|
||||
const virDomainObjPtr vm,
|
||||
const virDomainObj *vm,
|
||||
const char *cmd,
|
||||
char **reply)
|
||||
{
|
||||
|
@ -860,8 +860,8 @@ xenXMDomainSearchForUUID(const void *payload,
|
||||
const void *name ATTRIBUTE_UNUSED,
|
||||
const void *data)
|
||||
{
|
||||
const unsigned char *wantuuid = (const unsigned char *)data;
|
||||
const xenXMConfCachePtr entry = (const xenXMConfCachePtr)payload;
|
||||
const unsigned char *wantuuid = data;
|
||||
const xenXMConfCache *entry = payload;
|
||||
|
||||
if (!memcmp(entry->def->uuid, wantuuid, VIR_UUID_BUFLEN))
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user