From b326765c801ef5c291cbd9ab2c51b20128047b56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
Date: Tue, 23 Oct 2012 13:33:21 +0200
Subject: [PATCH] storage: don't shadow global 'wait' declaration

Rename the 'wait' parameter to 'loop'.
This silences the warning:
storage/storage_backend.c:1348:34: error: declaration of 'wait' shadows
a global declaration [-Werror=shadow]
and fixes the build with -Werror.
--
Note: loop is pool backwards.
---
 src/storage/storage_backend.c | 8 ++++----
 src/storage/storage_backend.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index 85b8287e30..75a3667bfb 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -1339,13 +1339,13 @@ virStorageBackendDetectBlockVolFormatFD(virStorageVolTargetPtr target,
  * Typically target.path is one of the /dev/disk/by-XXX dirs
  * with stable paths.
  *
- * If 'wait' is true, we use a timeout loop to give dynamic paths
+ * If 'loop' is true, we use a timeout loop to give dynamic paths
  * a change to appear.
  */
 char *
 virStorageBackendStablePath(virStoragePoolObjPtr pool,
                             const char *devpath,
-                            bool wait)
+                            bool loop)
 {
     DIR *dh;
     struct dirent *dent;
@@ -1376,7 +1376,7 @@ virStorageBackendStablePath(virStoragePoolObjPtr pool,
  reopen:
     if ((dh = opendir(pool->def->target.path)) == NULL) {
         opentries++;
-        if (wait && errno == ENOENT && opentries < 50) {
+        if (loop && errno == ENOENT && opentries < 50) {
             usleep(100 * 1000);
             goto reopen;
         }
@@ -1415,7 +1415,7 @@ virStorageBackendStablePath(virStoragePoolObjPtr pool,
         VIR_FREE(stablepath);
     }
 
-    if (wait && ++retry < 100) {
+    if (loop && ++retry < 100) {
         usleep(100 * 1000);
         goto retry;
     }
diff --git a/src/storage/storage_backend.h b/src/storage/storage_backend.h
index 71935a7607..29cad9d4c4 100644
--- a/src/storage/storage_backend.h
+++ b/src/storage/storage_backend.h
@@ -131,7 +131,7 @@ virStorageBackendDetectBlockVolFormatFD(virStorageVolTargetPtr target,
 
 char *virStorageBackendStablePath(virStoragePoolObjPtr pool,
                                   const char *devpath,
-                                  bool wait);
+                                  bool loop);
 
 typedef int (*virStorageBackendListVolRegexFunc)(virStoragePoolObjPtr pool,
                                                  char **const groups,