Tim Deegan
2013-Aug-15 10:42 UTC
[PATCH] 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 <jbeulich@suse.com> Signed-off-by: Tim Deegan <tim@xen.org> --- xen/arch/x86/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index f047cb3..4ba2480 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -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; -- 1.7.10.4
Jan Beulich
2013-Aug-15 11:20 UTC
Re: [PATCH] xen/x86/time: fix check for negative time in __update_vcpu_system_time()
>>> On 15.08.13 at 12:42, Tim Deegan <tim@xen.org> wrote: > 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