[lkml]   [2010]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/5]acpi:glue.c Fix warning: variable 'ret' set but not used
Justin P. Mattock <> wrote:

> a bit confused with the whole: "?:" though
> *condition ? value if true : value if false* (what if both are true
> what if both are false or does it matter?)

If you say:

cond ?: false_value

then you'll get cond if cond is non-zero and false_value if it isn't.

I suspect it's a gccism.


 \ /
  Last update: 2010-07-02 02:13    [W:0.058 / U:1.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site