[Sheepdog] [PATCH 6/9] shadow problem: time() is shadowed by a local time[]
Steven Dake
sdake at redhat.com
Mon May 17 18:37:14 CEST 2010
rename the local variable time to time_str.
Signed-off-by: Steven Dake <sdake at redhat.com>
---
collie/collie.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/collie/collie.c b/collie/collie.c
index d2bbef9..2195f57 100644
--- a/collie/collie.c
+++ b/collie/collie.c
@@ -884,7 +884,7 @@ static int cluster_info(int argc, char **argv)
int nr_logs;
time_t ti;
struct tm tm;
- char time[128];
+ char time_str[128];
fd = connect_to("localhost", sdport);
if (fd < 0)
@@ -919,9 +919,9 @@ static int cluster_info(int argc, char **argv)
ti = logs[i].ctime >> 32;
localtime_r(&ti, &tm);
- strftime(time, sizeof(time), "%y-%m-%d %H:%M:%S", &tm);
+ strftime(time_str, sizeof(time), "%y-%m-%d %H:%M:%S", &tm);
- printf("%s %6d", time, logs[i].epoch);
+ printf("%s %6d", time_str, logs[i].epoch);
printf(" [");
for (j = 0; j < logs[i].nr_nodes; j++) {
entry = logs[i].nodes + j;
--
1.6.2.5
More information about the sheepdog
mailing list