mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: fix build on RHEL 6
We keep forgetting that older setups don't like 'index': CC util/libvirt_util_la-virsysinfo.lo cc1: warnings being treated as errors util/virstoragefile.c: In function 'virStorageSourceFindByNodeName': util/virstoragefile.c:3804: error: declaration of 'index' shadows a global declaration [-Wshadow] /usr/include/string.h:489: error: shadowed declaration is here [-Wshadow] Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
ad589e1f52
commit
044198476a
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* virstoragefile.c: file utility functions for FS storage backend
|
* virstoragefile.c: file utility functions for FS storage backend
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2014, 2016 Red Hat, Inc.
|
* Copyright (C) 2007-2017 Red Hat, Inc.
|
||||||
* Copyright (C) 2007-2008 Daniel P. Berrange
|
* Copyright (C) 2007-2008 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -3801,23 +3801,23 @@ virStorageSourceIsRelative(virStorageSourcePtr src)
|
|||||||
virStorageSourcePtr
|
virStorageSourcePtr
|
||||||
virStorageSourceFindByNodeName(virStorageSourcePtr top,
|
virStorageSourceFindByNodeName(virStorageSourcePtr top,
|
||||||
const char *nodeName,
|
const char *nodeName,
|
||||||
unsigned int *index)
|
unsigned int *idx)
|
||||||
{
|
{
|
||||||
virStorageSourcePtr tmp;
|
virStorageSourcePtr tmp;
|
||||||
|
|
||||||
if (index)
|
if (idx)
|
||||||
*index = 0;
|
*idx = 0;
|
||||||
|
|
||||||
for (tmp = top; tmp; tmp = tmp->backingStore) {
|
for (tmp = top; tmp; tmp = tmp->backingStore) {
|
||||||
if ((tmp->nodeformat && STREQ(tmp->nodeformat, nodeName)) ||
|
if ((tmp->nodeformat && STREQ(tmp->nodeformat, nodeName)) ||
|
||||||
(tmp->nodebacking && STREQ(tmp->nodebacking, nodeName)))
|
(tmp->nodebacking && STREQ(tmp->nodebacking, nodeName)))
|
||||||
return tmp;
|
return tmp;
|
||||||
|
|
||||||
if (index)
|
if (idx)
|
||||||
(*index)++;
|
(*idx)++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index)
|
if (idx)
|
||||||
*index = 0;
|
*idx = 0;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user