core: Fix error checking in _gpgme_mkstemp.

* src/w32-util.c (_gpgme_mkstemp): Fix error checking.
(dlopen): Mark FLAGS as unused.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-09-22 12:46:06 +02:00
parent dc39552d01
commit c447b64d59
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -98,6 +98,8 @@ static GPG_ERR_INLINE void *
dlopen (const char * name, int flag)
{
void * hd = LoadLibrary (name);
(void)flag;
return hd;
}
@ -754,7 +756,7 @@ _gpgme_mkstemp (int *fd, char **name)
if (!tmpname)
return -1;
*fd = my_mkstemp (tmpname);
if (fd < 0)
if (*fd < 0)
{
free (tmpname);
return -1;