[flashrom] [PATCH] Fix undefined behavior in some preprocessor define checks
Stefan Tauner
stefan.tauner at alumni.tuwien.ac.at
Fri Dec 2 11:06:06 CET 2016
On Fri, 2 Dec 2016 08:28:11 +0100
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:
> Hi Stefan,
>
> this patch includes [flashrom] [PATCH] Fix undefined behavior in OS defines
> Is that intentional?
Yes, of course: for the second one I checked the source code more
thoroughly (looking for #define.*defined IIRC)and it replaces the first
patch.
>
> One minor nitpick: Using "#ifdef IS_LINUX" will be true on all
> platforms with that change. Admittedly it probably was undefined
> behaviour before, so this is an improvement. I wonder if we should add a
> comment before the IS_ and USE_ #defines to tell people to always use
> them with #if and never with if defined() or #ifdef.
#ifdef IS_LINUX reads wrong already so I don't think this is a real
issue. That's the point of using the prefixes IS_ (and USE_): to convey
the information that these are already boolean values.
> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Now we just need a proper repo to push it to... :)
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
More information about the flashrom
mailing list