On Thu, 28.11.13 09:36, David Herrmann ([email protected]) wrote: > > Hi > > On Wed, Nov 27, 2013 at 11:17 PM, Lennart Poettering > <[email protected]> wrote: > > On Wed, 27.11.13 19:48, David Herrmann ([email protected]) wrote: > > > >> + > >> +enum { > >> + SD_GFX__LED_NUML, > >> + SD_GFX__LED_CAPSL, > >> + SD_GFX__LED_SCROLLL, > >> + SD_GFX__LED_COUNT, > >> +}; > > > > Double underscores? > > Yes.
Why? > > If these are bools, then make them bools! C99 bools (i.e. the type > > "bool" from stdbool.h) are awesome for bit fields! [ Please use C99 bools > > everywhere in internal code, and "int" as bool type for public APIs, > > since that's what pre-C99 code usually did, despite the stupidity this > > results in when people use bit fields ] > > You can use "_Bool/bool" for bitfields? Yes, that's what makes them so useful! Otherwise C99 bools are just meh. But in bitfields, yuppideefuckindoo! > Didn't know that. I always use "bool" for boolean values, I only > thought they don't work for bitfields. Will fix that up. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
