[Reproducible-builds] GCC patch reviewed. Proposed mail for gcc-patches mailing list

Dhole dhole at openmailbox.org
Tue Nov 10 23:33:40 UTC 2015


Hi Chris :)

On 11/09/2015 12:11 PM, Chris Lamb wrote:
> Just a few quick comment on the patch itself:
> 
> +  source_date_epoch = getenv ("SOURCE_DATE_EPOCH");
> +  if (source_date_epoch)
> +    {
> +      errno = 0;
> +      [..]
> +      return (long long) epoch;
> +    }
> +  else
> +    return -1;
> +}
> 
> If you are copying the surrounding code style (I don't have the context
> in front of me) then feel free to ignore this, but generally I find
> something like this much cleaner:
> 
> +  source_date_epoch = getenv ("SOURCE_DATE_EPOCH");
> +  if (!source_date_epoch)
> +    return -1
> +
> +  errno = 0;
> +  [..]
> +  return (long long) epoch;
> +}
> 
> IMHO removing indentation levels isn't for the aesthetics; it actually
> removes cognitive load on a human reading it as they don't have to
> manage/remember/push state in their mind.

That does look much cleaner, thanks for the advice! I've modified the
patch following your suggestion.

-- 
Dhole

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20151111/90fb014e/attachment.sig>


More information about the Reproducible-builds mailing list