aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysutils.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2010-11-01 16:23:33 +0000
committerMarcus Brinkmann <[email protected]>2010-11-01 16:23:33 +0000
commitce484b9aaff7331a36da08b6d9b42740d232c72d (patch)
tree1b4e2c953fcec9c79143715765a3b02b76207707 /src/sysutils.c
parent2010-11-01 Marcus Brinkmann <[email protected]> (diff)
downloadlibassuan-ce484b9aaff7331a36da08b6d9b42740d232c72d.tar.gz
libassuan-ce484b9aaff7331a36da08b6d9b42740d232c72d.zip
2010-11-01 Marcus Brinkmann <[email protected]>
* configure.ac: Check for fcntl.h. 2010-11-01 Marcus Brinkmann <[email protected]> * assuan-socket.c, assuan-uds.c, system.c, assuan-pipe-server.c, assuan-pipe-connect.c [!HAVE_FCNTL_H]: Don't include fcntl.h. * assuan-buffer.c [!HAVE_W32CE_SYSTEM]: Do not include process.h. * assuan-socket.c [!HAVE_W32CE_SYSTEM]: Do not include io.h. * w32-includes.inc.h: Include winsock2.h before ws2tcpip.h. * sysutils.c (w32_read_registry): Replace goto label "leave" by "out" (as leave is defined by some Windows header file). * assuan-inquire.c: Likewise.
Diffstat (limited to 'src/sysutils.c')
-rw-r--r--src/sysutils.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sysutils.c b/src/sysutils.c
index 578e47d..5a1d9de 100644
--- a/src/sysutils.c
+++ b/src/sysutils.c
@@ -70,33 +70,33 @@ w32_read_registry (const wchar_t *dir, const wchar_t *name)
nbytes = 1;
if (RegQueryValueEx (handle, name, 0, NULL, NULL, &nbytes))
- goto leave;
+ goto out;
buffer = malloc ((n=nbytes+2));
if (!buffer)
- goto leave;
+ goto out;
if (RegQueryValueEx (handle, name, 0, NULL, (PBYTE)buffer, &n))
{
free (buffer);
buffer = NULL;
- goto leave;
+ goto out;
}
n = WideCharToMultiByte (CP_UTF8, 0, buffer, nbytes, NULL, 0, NULL, NULL);
if (n < 0 || (n+1) <= 0)
- goto leave;
+ goto out;
result = malloc (n+1);
if (!result)
- goto leave;
+ goto out;
n = WideCharToMultiByte (CP_UTF8, 0, buffer, nbytes, result, n, NULL, NULL);
if (n < 0)
{
free (result);
result = NULL;
- goto leave;
+ goto out;
}
result[n] = 0;
- leave:
+ out:
free (buffer);
RegCloseKey (handle);
return result;