]> git.meshlink.io Git - meshlink/blobdiff - src/tincd.c
Merge branch 'master' of git://tinc-vpn.org/tinc into 1.1
[meshlink] / src / tincd.c
index 17d50085eefa0b11abe808ee1904ee0e8fa81906..23845fff1f2942ada86b7e229c96ab307adf2347 100644 (file)
@@ -64,7 +64,7 @@
 #include "xalloc.h"
 
 /* The name this program was run with. */
-static char *program_name = NULL;
+char *program_name = NULL;
 
 /* If nonzero, display usage information and exit. */
 static bool show_help = false;
@@ -339,7 +339,7 @@ static bool drop_privs(void) {
 }
 
 #ifdef HAVE_MINGW
-# define setpriority(level) SetPriorityClass(GetCurrentProcess(), (level))
+# define setpriority(level) !SetPriorityClass(GetCurrentProcess(), (level))
 #else
 # define NORMAL_PRIORITY_CLASS 0
 # define BELOW_NORMAL_PRIORITY_CLASS 10
@@ -445,7 +445,7 @@ int main2(int argc, char **argv) {
 
        /* Change process priority */
 
-        char *priority = 0;
+        char *priority = NULL;
 
         if(get_config_string(lookup_config(config_tree, "ProcessPriority"), &priority)) {
                 if(!strcasecmp(priority, "Normal")) {