summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
50df317)
Remove unneeded NULL checks at CreateServiceA/W and ChangeServiceConfigW/A().
Patch by Victor Martinez Calvo.
CORE-11610 #resolve #comment Thanks a lot!
svn path=/trunk/; revision=71953
/* FIXME: Encrypt the password */
lpEncryptedPassword = (LPBYTE)lpPasswordW;
/* FIXME: Encrypt the password */
lpEncryptedPassword = (LPBYTE)lpPasswordW;
- dwPasswordLength = (DWORD)(lpPasswordW ? (wcslen(lpPasswordW) + 1) * sizeof(WCHAR) : 0);
+ dwPasswordLength = (wcslen(lpPasswordW) + 1) * sizeof(WCHAR);
dwDependenciesLength *= sizeof(WCHAR);
}
dwDependenciesLength *= sizeof(WCHAR);
}
- /* FIXME: Encrypt the password */
- lpEncryptedPassword = (LPBYTE)lpPassword;
- dwPasswordLength = (lpPassword ? (wcslen(lpPassword) + 1) * sizeof(WCHAR) : 0);
+ if (lpPassword != NULL)
+ {
+ /* FIXME: Encrypt the password */
+ lpEncryptedPassword = (LPBYTE)lpPassword;
+ dwPasswordLength = (wcslen(lpPassword) + 1) * sizeof(WCHAR);
+ }
/* FIXME: Encrypt the password */
lpEncryptedPassword = (LPBYTE)lpPasswordW;
/* FIXME: Encrypt the password */
lpEncryptedPassword = (LPBYTE)lpPasswordW;
- dwPasswordLength = (DWORD)(lpPasswordW ? (wcslen(lpPasswordW) + 1) * sizeof(WCHAR) : 0);
+ dwPasswordLength = (wcslen(lpPasswordW) + 1) * sizeof(WCHAR);
dwDependenciesLength *= sizeof(WCHAR);
}
dwDependenciesLength *= sizeof(WCHAR);
}
- /* FIXME: Encrypt the password */
- lpEncryptedPassword = (LPBYTE)lpPassword;
- dwPasswordLength = (DWORD)(lpPassword ? (wcslen(lpPassword) + 1) * sizeof(WCHAR) : 0);
+ if (lpPassword != NULL)
+ {
+ /* FIXME: Encrypt the password */
+ lpEncryptedPassword = (LPBYTE)lpPassword;
+ dwPasswordLength = (wcslen(lpPassword) + 1) * sizeof(WCHAR);
+ }