On Sun, Aug 14, 2016 at 11:49:00AM -0700, Philip Guenther wrote: > On Sun, Aug 14, 2016 at 1:26 AM, Martin Natano <[email protected]> wrote: > > On Sat, Aug 13, 2016 at 11:41:26PM -0700, Philip Guenther wrote: > ... > >> @@ -1124,14 +1122,14 @@ getval(struct limits *lp, Char **v) > >> cp++; > >> if (*cp == 0) { > >> if (*v == 0) > >> - return ((RLIM_TYPE) ((f + 0.5) * lp->limdiv)); > >> + return ((rlim_t) ((f + 0.5) * lp->limdiv)); > > > > Shouldn't 'return (f + 0.5) * lp->limdiv;' be enough here, because > > rlim_t is the return type? > > This is perhaps an inconsistency in my preferences, but I mildly > prefer the cast here because it's a potentially lossy float->integer > conversion.
This 'inconsistency' is indeed what made me comment here. I guess in the float->int case the cast is ok though. Feel free to commit including the cast. > > Philip
