dlls/ole32: check some dead store results (llvm/clang)

Michael Karcher wine at mkarcher.dialup.fu-berlin.de
Thu Nov 20 12:45:08 CST 2008


Am Donnerstag, den 20.11.2008, 18:36 +0000 schrieb ricardo filipe:
| -       if ((err=RegOpenKeyA(HKEY_CLASSES_ROOT,buf,&xhkey))) {
| +       if (RegOpenKeyA(HKEY_CLASSES_ROOT,buf,&xhkey) == ERROR_SUCCESS) {

No. This inverts the logic of the tests. if(x) means if(x != 0). And
ERROR_SUCCESS is just zero. To prevent just this possible mistake, a
patch making the condition obvious was requested.

Regards,
  Michael Karcher




More information about the wine-devel mailing list