]> www.tinc-vpn.org Git - tinc/blobdiff - src/names.c
Reduce duplication in request handler tables
[tinc] / src / names.c
index 4f543c921242a7b345f12a715064088a4a308f48..fa3574b0ea24c7d2ee047a5880900f02f6cc3d67 100644 (file)
@@ -39,7 +39,7 @@ char *program_name = NULL;
   Set all files and paths according to netname
 */
 void make_names(bool daemon) {
-#ifdef HAVE_MINGW
+#ifdef HAVE_WINDOWS
        HKEY key;
        char installdir[1024] = "";
        DWORD len = sizeof(installdir);
@@ -58,7 +58,7 @@ void make_names(bool daemon) {
                identname = xstrdup("tinc");
        }
 
-#ifdef HAVE_MINGW
+#ifdef HAVE_WINDOWS
 
        if(!RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\tinc", 0, KEY_READ, &key)) {
                if(!RegQueryValueEx(key, NULL, 0, 0, (LPBYTE)installdir, &len)) {
@@ -94,7 +94,7 @@ void make_names(bool daemon) {
                }
        }
 
-#ifdef HAVE_MINGW
+#ifdef HAVE_WINDOWS
        (void)daemon;
 
        if(!logfilename) {
@@ -150,7 +150,7 @@ void make_names(bool daemon) {
 #endif
 
        if(!unixsocketname) {
-               int len = strlen(pidfilename);
+               size_t len = strlen(pidfilename);
                unixsocketname = xmalloc(len + 8);
                memcpy(unixsocketname, pidfilename, len);