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

Chris Lamb lamby at debian.org
Mon Nov 9 11:11:28 UTC 2015


Dhole,

First of all thanks so much for working on this patch and especially for
taking extra attention before posting it to GCC list given the high
volume, etc. there.

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.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-



More information about the Reproducible-builds mailing list