From: Ian Jackson Subject: Re: [PATCH v3 05/10] libxl: localtime(3) can return NULL Date: Tue, 14 Jul 2015 18:22:37 +0100 Message-ID: <21925.17757.694183.365186@mariner.uk.xensource.com> References: <1436892073-14186-1-git-send-email-wei.liu2@citrix.com> <1436892073-14186-6-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZF3ur-0006sN-BR for xen-devel@lists.xenproject.org; Tue, 14 Jul 2015 17:22:49 +0000 In-Reply-To: <1436892073-14186-6-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: Xen-devel , Ian Campbell List-Id: xen-devel@lists.xenproject.org Wei Liu writes ("[PATCH v3 05/10] libxl: localtime(3) can return NULL"): > Signed-off-by: Wei Liu ... > t = time(NULL); > tm = localtime(&t); > > + if (!tm) { > + ret = ERROR_FAIL; You must log something here I think. Otherwise this function generates ERROR_FAIL entirely mysteriously (in this quite unlikely error path). Ian.