On Fri, 30.08.13 17:22, Colin Guthrie (gm...@colin.guthr.ie) wrote: > > 'Twas brillig, and David Herrmann at 30/08/13 14:50 did gyre and gimble: > > + subsystem = subsystem ? : ""; > > + > > zomg!!11eleven! This makes perfect sense but somehow this is the first > time I've seen this syntax before where the value between ? and : is > inherited from the test itself... nice! > > For what it's worth the two other uses of this syntax in the systemd > codebase don't have a space between the ? and : (dunno if this qualifies > for a coding standard tho'!) > > /me will now go and craw back under his rock...
btw, for this specific usecase we have a macro strempty(), which hides the ternary operator... We generally prefer using that... Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel