summaryrefslogtreecommitdiffstats
path: root/server/stat.h
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2015-11-12 13:25:09 +0000
committerFrediano Ziglio <fziglio@redhat.com>2015-11-12 13:25:09 +0000
commit1ab8df03ce0c731df0f93f4c334682782759d030 (patch)
treef8a80c365ada7ce2c346e834ea15e3fe1f211c45 /server/stat.h
parentf4810b0065c17506039e981349557cf95a8b08f7 (diff)
downloadspice-1ab8df03ce0c731df0f93f4c334682782759d030.tar.gz
spice-1ab8df03ce0c731df0f93f4c334682782759d030.tar.xz
spice-1ab8df03ce0c731df0f93f4c334682782759d030.zip
worker: fix compiling with COMPRESS_STAT enabled
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Diffstat (limited to 'server/stat.h')
-rw-r--r--server/stat.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/stat.h b/server/stat.h
index 52e6e781..3c980d04 100644
--- a/server/stat.h
+++ b/server/stat.h
@@ -87,13 +87,13 @@ static inline void stat_compress_init(stat_info_t *info, const char *name)
stat_reset(info);
}
-static inline void stat_compress_add(RedWorker *worker, stat_info_t *info,
+static inline void stat_compress_add(stat_info_t *info,
stat_time_t start, int orig_size,
int comp_size)
{
stat_time_t time;
++info->count;
- time = stat_now(worker) - start;
+ time = stat_now(info->clock) - start;
info->total += time;
info->max = MAX(info->max, time);
info->min = MIN(info->min, time);
@@ -101,7 +101,7 @@ static inline void stat_compress_add(RedWorker *worker, stat_info_t *info,
info->comp_size += comp_size;
}
-double inline stat_byte_to_mega(uint64_t size)
+static inline double stat_byte_to_mega(uint64_t size)
{
return (double)size / (1000 * 1000);
}