Skip to contentSkip to conversation

xen/x86/time: fix check for negative time in __update_vcpu_system_time()

PATCH In review Tim Deegan 2 participants 2 messages Aug 15, 2013

lore
Share & tools
lore

Tim Deegan

author
#0 lore raw

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.

---
 xen/arch/x86/time.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/time.c +1 -1
index f047cb3..4ba2480 100644
@@ -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
#1 lore raw
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