slightly OT: c expression evaluation order

Michael Jung mjung at iss.tu-darmstadt.de
Sat Jul 24 13:38:25 CDT 2004


Hello,

this is slightly of topic for this mailing list. However, it would be nice if
someone could answer my question. I've seen that Alexandre changed the if
statement expression in one of my patches from

if (pszProvider ? *pszProvider == '\0' : 1)

to

if (!pszProvider || !*pszProvider)

I've always thought that the order in which subexpressions are evaluated is
not specified in the C language. Isn't there the danger of a NULL pointer
dereference given here?

Thanks,
Michael



More information about the wine-devel mailing list