]> git.proxmox.com Git - mirror_qemu.git/commitdiff
cpus: rename local variable to meaningful one
authorCao jin <caoj.fnst@cn.fujitsu.com>
Fri, 29 Jul 2016 11:05:37 +0000 (19:05 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 Sep 2016 17:08:44 +0000 (19:08 +0200)
The function actually returns monotonic time value in nanosecond,
the "ticks" is not suitable.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc  Peter Crosthwaite <crosthwaite.peter@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Message-Id: <1469790338-28990-3-git-send-email-caoj.fnst@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
cpus.c

diff --git a/cpus.c b/cpus.c
index 84c3520d446f53a57a57c5732bbb9dcc230070bf..e11caf7cedb84e90a9ecbebc728c901ee51f19df 100644 (file)
--- a/cpus.c
+++ b/cpus.c
@@ -219,14 +219,14 @@ int64_t cpu_get_ticks(void)
 
 static int64_t cpu_get_clock_locked(void)
 {
-    int64_t ticks;
+    int64_t time;
 
-    ticks = timers_state.cpu_clock_offset;
+    time = timers_state.cpu_clock_offset;
     if (timers_state.cpu_ticks_enabled) {
-        ticks += get_clock();
+        time += get_clock();
     }
 
-    return ticks;
+    return time;
 }
 
 /* return the host CPU monotonic timer and handle stop/restart */