From: Sunil S. <sh...@bo...> - 2006-03-13 14:41:11
|
Quoting from Nico Golde's mail on Sun, Mar 12, 2006: > * Miloslav Trmac <mi...@re...> [2006-03-12 01:25]: > [...] > > - if (retval = krb5_cc_get_principal(context, ccdef, &client)) { > > + if ((retval = krb5_cc_get_principal(context, ccdef, &client)) != 0) { > > [...] > What is your point here? I can't see a real reason to do > this because its the same. The C construct if (var = expression) { ... } is valid, but is also a common typo. The actual intention may be to write it as: if (var == expression) { ... } To emphasise that it is not a typo, it is preferred to write the first expression above in one of the following formats: if ((var = expression) != 0) { ... } if ((var = expression)) { ... } So, it's the same, but it's different. -- Sunil Shetye. |