On Thu, Jun 26, 2014 at 07:00:16AM -0700, Gurucharan Shetty wrote:
> 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 would cause
> 'ovs-ofctl benchmark' to produce wrong results.
> 
> This commit fixes it by having a separate initialization function
> for 'unix_epoch' and calling it from functions that actually use it.
> 
> Reported-by: Alessandro Pilotti <apilo...@cloudbasesolutions.com>
> Reported-by: Linda Sun <l...@vmware.com>
> Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>

This value is a compile-time constant, it's just inconvenient to
calculate at compile time, right?  Can we just calculate it once
and initialize it as a "static const" at whatever scope is appropriate,
adding a comment explaining how it was calculated?
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to