[Patch 2/3] chcli cleanup: gcc warning

Pete Zaitcev <[email protected]>
Newsgroups org.kernel.vger.hail-devel
Message-ID <[email protected]>
The variable "stat" produces the following warning:

chcli.c:441: warning: declaration of ‘stat’ shadows a global declaration

Just rename it to fix.

Signed-Off-By: Pete Zaitcev <[email protected]>

---
 tools/chcli.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/chcli.c b/tools/chcli.c
index 1c3576d..7f3858e 100644
--- a/tools/chcli.c
+++ b/tools/chcli.c
@@ -438,7 +438,7 @@ static bool stc_put_file(struct st_client *stc, const void *key, size_t key_len,
 {
 	bool rcb;
 	int fd;
-	struct stat stat;
+	struct stat statb;
 	off64_t content_len;
 	int rc;
 
@@ -446,12 +446,12 @@ static bool stc_put_file(struct st_client *stc, const void *key, size_t key_len,
 	if (fd < 0)
 		return false;
 
-	rc = fstat(fd, &stat);
+	rc = fstat(fd, &statb);
 	if (rc) {
 		close(fd);
 		return false;
 	}
-	content_len = stat.st_size;
+	content_len = statb.st_size;
 	rcb = stc_put(stc, key, key_len, read_file_cb, content_len, &fd, flags);
 	close(fd);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.