xen/x86/time: fix check for negative time in __update_vcpu_system_time()
PATCH 1/1 xen/x86/time: fix check for negative time in __update_vcpu_system_time()
Clang points out that u64 stime variable is always >= 0.
Cc Jan Beulich <[email protected]>
Signed-off-by Tim Deegan <[email protected]>
--- xen/arch/x86/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/time.c +1 -1
@@ -817,7 +817,7 @@ static void __update_vcpu_system_time(struct vcpu *v, int force)if ( d->arch.vtsc ) { -u64 stime = t->stime_local_stamp; +s_time_t stime = t->stime_local_stamp;if (is_hvm_domain (d) ) {struct pl_time *pl = &v->domain->arch.hvm_domain.pl_time;
Signature · 1 line
1.7.10.4
Quoted 2 lines
Quoted 1 line
Quoted 1 line · Tim Deegan
Clang points out that u64 stime variable is always >= 0.
Oh, indeed - somehow I lost the cast that was there on the check prior to commit 5ad914bc.
Thanks - committed.
Jan