]> git.proxmox.com Git - ovs.git/commit
timeval: Initialize 'unix_epoch' for Windows correctly.
authorGurucharan Shetty <gshetty@nicira.com>
Thu, 26 Jun 2014 04:27:36 +0000 (21:27 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Wed, 9 Jul 2014 23:30:35 +0000 (16:30 -0700)
commit4537a423fb4c607fcbef53ab830e86250ba8748c
tree7453793cb0716f9a73a35f138e0f50d4c0d5b1b3
parent17f2748d245e74249d46a590da0f7456ebb27e7c
timeval: Initialize 'unix_epoch' for Windows correctly.

Till now, we were initializing 'unix_epoch' through time_init().
But if there was a call directly to xgettimeofday(), we would
miss the initialization causing overflows. This commit fixes it
by pre-calculating the value and assigning it globally.

Also add-in a missing return statement.

Reported-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
Reported-by: Linda Sun <lsun@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/timeval.c