From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>, Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v4 2/3] libxl: localtime(3) can return NULL
Date: Wed, 22 Jul 2015 15:19:08 +0100 [thread overview]
Message-ID: <1437574748.19412.6.camel@citrix.com> (raw)
In-Reply-To: <20150717171241.GW12455@zion.uk.xensource.com>
On Fri, 2015-07-17 at 18:12 +0100, Wei Liu wrote:
> On Fri, Jul 17, 2015 at 06:05:45PM +0100, Ian Jackson wrote:
> > Wei Liu writes ("[PATCH v4 2/3] libxl: localtime(3) can return
> > NULL"):
> > > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> >
> > > tm = localtime(&t);
> > > + if (!tm) {
> > > + LOG(ERROR, "Failed to call localtime");
> >
> > localtime sets errno if it fails. So you mean LOGE.
> >
>
> Heh. Linux manpage doesn't say so. But
>
> http://pubs.opengroup.org/onlinepubs/009695399/functions/localtime.ht
> ml
>
> does say that.
>
> I will rework this patch and send it out next week with other
> coverity
> scan inspired patches I accumulate.
Should we not be using localtime_t in libxl? Afterall we don't know
what other threads in the application might be doing.
next prev parent reply other threads:[~2015-07-22 14:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 17:01 [PATCH v4 0/3] xl/libxl: fix some issues discovered by coverity Wei Liu
2015-07-17 17:01 ` [PATCH v4 1/3] libxl: make libxl__strdup and libxl__strndup handle NULL Wei Liu
2015-07-17 17:03 ` Ian Jackson
2015-07-21 14:50 ` Ian Campbell
2015-07-17 17:01 ` [PATCH v4 2/3] libxl: localtime(3) can return NULL Wei Liu
2015-07-17 17:05 ` Ian Jackson
2015-07-17 17:12 ` Wei Liu
2015-07-22 14:19 ` Ian Campbell [this message]
2015-07-22 15:09 ` Wei Liu
2015-07-22 15:13 ` Ian Campbell
2015-07-17 17:01 ` [PATCH v4 3/3] libxl: call libxl_cpupoolinfo_{init, dispose} in numa_place_domain Wei Liu
2015-07-17 17:03 ` Ian Jackson
2015-07-21 14:50 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437574748.19412.6.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).