On Tue, Aug 23, 2011 at 3:13 PM, Joris Huizer <joris_huizer@yahoo.com> wrote:
On 08/23/2011 11:45 AM, Hans Leidekker wrote:
+ if (!strcmpiW( package, unsquashed ))
I'm confused about the last part of the function.
I think if the comparison between 'package' and 'unsquashed' fails, you want to return an error,
but the return value 'r' will be ERROR_SUCCESS at that point, and isn't updated.
Hello,
The function strcmpiW returns 0 when the strings are equal, and non-zero when they are different (< 0 if first is smaller, > 0 if first is larger, lexicographically speaking). The condition checks if the strings match, not if the function failed (string comparison cannot "fail").
Cheers,
Octavian