[user/tests/sysparams.c] Added more SetLastError(0)'s

Alexandre Julliard julliard at winehq.org
Thu Mar 3 06:41:46 CST 2005


Paul Vriens <Paul.Vriens at xs4all.nl> writes:

> if (rc != 0 && (GetLastError()==0xdeadbeef))
> {
>   /* API did not change the last error to 0 */
>   what_do_we_do_here?
> }
> 
> if (rc != 0 && (GetLastError()==0))
> {
>   /* API changed the last error to 0 */
>   do_nothing!
> }

You should not check last error on success, it's meaningless except in
a few very specific cases.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list