Re: advapi32: Add RegOpen/CloseKey test and fixes
18 Feb
2005
18 Feb
'05
6:27 a.m.
"James Hawkins" <truiken(a)gmail.com> wrote:
+ static const WCHAR emptyW[] = {0}; + + if (!name || !strcmpW(name, emptyW)) { + *retkey = hkey; + return ERROR_SUCCESS; + }
+ if (!name || !strcmp(name, "")) { + *retkey = hkey; + return ERROR_SUCCESS; + }
Instead of introducing emptyW and calling strcmp[W] with an empty string it's much simpler and more readable to use in both cases: if (!name || !*name) { *retkey = hkey; return ERROR_SUCCESS; } -- Dmitry.
7606
Age (days ago)
7606
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov