[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 13/24] Don't assume tv_sec is a unsigned long (for NetBSD)


  • To: Manuel Bouyer <bouyer@xxxxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 4 Jan 2021 19:17:58 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yZNrPok5twsAO+jiM4imfFKBZ9lG1a68We/xSKvAp1A=; b=KO3XRWQj1VVknr+ASg3QfxQHiRICAwTGkhS2DhVKi2p9j1/3pcnyB//h31NEjSGvFIGwetCDtTuKJMoQU1fZp+EmPgNP8Ra1/+iVRDy2XUdFgl0aueRHhP58fhFbLe1b9vi+F5wiTRAYt51w6TBtJiTROraJnecELixhYkyuE+YVq8G6+BzO8BDYJxZr+dClZpoXM0hFmVrKLYk5UZawdmjkGvw8miMvtfx2NkIyw4RnCbgeRv76trjvU/7OwB3NBi54S6BkA09XQFsrgXXzFLOl3L9vkod280Ok45BghaJ2VZhA3ZvaTrtT23WF3RRF7xF3rqAuHY1a15EUtooXNA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=brmKsxtp5mjXtJOz94z1gSxggodii1AWdagBXfS6AoOQpSeBcPVyy12UPfEzUeFoU41bV34P84HtMtTL8SfGUBTGbU11wx+7w19kepbXWmSJY9p/qxjLbogF+QwMgzOkWy+n2xt4aWCBo6BIUvv+DEbbroOr4EQamMp8go+ufld16wdK43WPPdCL9HTEKZFH7CntxhM6/17TZvyauAn2IB39fd8xOdlthQd+wa5GHuxq139UcdfrueR/L/u99CMXozNtj4GuQvb3C5d8icBtLX+H3BJVKiXckxOXi3sXwEu+99kx2uGUtup5o0d1wCzU2iybdcNokEN2cvCh2MkIyg==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 04 Jan 2021 18:18:14 +0000
  • Ironport-sdr: bRVqbmlbnSdIzgmalHp3jFGUrknJzkZUrHVTDuFpVr40ZJOSgPedI5DC4Nn2cjClqiOMCGcj57 RrND9vxWhUnqEUk4j18oOXi8uzdq3TBmWAlqy0ZxPPP6Edi6TH13eME/e3d3mAhGTsKRvo9eG6 loYkHsj0CsJQscjym7LWs20fJufFs/GQ/bI2SISSi9Qwz9erRMHt7NlASaXKRFi/NiQaWxTyRV EV/s18e8A+cR3qjPD1YLVu5snnH3d8zU0CgMTPVazj/v42NaQdxoJzuIIY5z8zrdqBvbbVZ+Bc G08=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Jan 04, 2021 at 11:31:56AM +0100, Manuel Bouyer wrote:
> On Tue, Dec 29, 2020 at 03:02:15PM +0100, Roger Pau Monné wrote:
> > On Mon, Dec 14, 2020 at 05:36:12PM +0100, Manuel Bouyer wrote:
> > > ---
> > >  tools/libs/light/libxl_create.c | 8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/tools/libs/light/libxl_create.c 
> > > b/tools/libs/light/libxl_create.c
> > > index 321a13e519..44691010bc 100644
> > > --- a/tools/libs/light/libxl_create.c
> > > +++ b/tools/libs/light/libxl_create.c
> > > @@ -496,7 +496,7 @@ int libxl__domain_build(libxl__gc *gc,
> > >          vments[2] = "image/ostype";
> > >          vments[3] = "hvm";
> > >          vments[4] = "start_time";
> > > -        vments[5] = GCSPRINTF("%lu.%02d", 
> > > start_time.tv_sec,(int)start_time.tv_usec/10000);
> > > +        vments[5] = GCSPRINTF("%jd.%02d", 
> > > start_time.tv_sec,(int)start_time.tv_usec/10000);
> > 
> > You don't cast tv_sec to intmax_t here...
> > 
> > >  
> > >          localents = libxl__calloc(gc, 13, sizeof(char *));
> > >          i = 0;
> > > @@ -535,7 +535,7 @@ int libxl__domain_build(libxl__gc *gc,
> > >          vments[i++] = "image/kernel";
> > >          vments[i++] = (char *) state->pv_kernel.path;
> > >          vments[i++] = "start_time";
> > > -        vments[i++] = GCSPRINTF("%lu.%02d", 
> > > start_time.tv_sec,(int)start_time.tv_usec/10000);
> > > +        vments[i++] = GCSPRINTF("%jd.%02d", 
> > > (intmax_t)start_time.tv_sec,(int)start_time.tv_usec/10000);
> > 
> > ... yet you do it here. I think the first occurrence is missing the
> > cast?
> 
> thanks, fixed.

Add my:

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Then.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.