Signed-off-by: Wei Liu <wei.l...@citrix.com> --- v4: add logging --- tools/libxl/libxl_x86.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c index 8cd15ca..ce14a73 100644 --- a/tools/libxl/libxl_x86.c +++ b/tools/libxl/libxl_x86.c @@ -311,6 +311,12 @@ int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config, t = time(NULL); tm = localtime(&t); + if (!tm) { + LOG(ERROR, "Failed to call localtime"); + ret = ERROR_FAIL; + goto out; + } + rtc_timeoffset += tm->tm_gmtoff; } @@ -335,6 +341,7 @@ int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config, } } +out: return ret; } -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel