info-mtools
[Top][All Lists]
Advanced

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

Re: [Info-mtools] [PATCH] misc.c: Make the output reproducible


From: Chris Lamb
Subject: Re: [Info-mtools] [PATCH] misc.c: Make the output reproducible
Date: Mon, 29 Oct 2018 17:09:58 -0400

Hi Pali,

Thank you for your detailed and prompt review.

> 1) Detection of underflow. When you specify negative epoch in env
> variable, then it underflows and value is converted to some positive
> integer.

Getcha, I guess this would be as simple as just another branch:

 +                      else if (epoch < 0)
 +                              fprintf(stderr, "SOURCE_DATE_EPOCH must be >= 
0\n")

> 2) Leading (whitespace) garbage.

I am not checking this as strtoul(3) and strtoull(3) are "allowed"
to have such white space:

    The string may begin with an arbitrary amount of white space
    (as determined by isspace(3))

Whilst it would certianly be possible to check for that I am not
sure it would be really worth it and add another branch somewhat
unnecessarily.

Thanks again for your input.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      address@hidden / chris-lamb.co.uk
       `-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]