64-bit fsnotifier for Linux (fixed)
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Tue, 27 Apr 2010 17:35:54 +0000 (21:35 +0400)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Tue, 27 Apr 2010 17:35:54 +0000 (21:35 +0400)
native/fsNotifier/linux/fsnotifier64 [new file with mode: 0755]
native/fsNotifier/linux/main.c

diff --git a/native/fsNotifier/linux/fsnotifier64 b/native/fsNotifier/linux/fsnotifier64
new file mode 100755 (executable)
index 0000000..1c959e2
Binary files /dev/null and b/native/fsNotifier/linux/fsnotifier64 differ
index e728e452e52d857894b69adc08b646f2eb38ab25..9655ca2fbc38bc4092ec6a7e62204d60fb265d49 100644 (file)
@@ -148,9 +148,10 @@ static void init_log() {
 
 void userlog(int priority, const char* format, ...) {
   va_list ap;
-  va_start(ap, format);
 
+  va_start(ap, format);
   vsyslog(priority, format, ap);
+  va_end(ap);
 
   if (self_test) {
     const char* level = "debug";
@@ -160,11 +161,13 @@ void userlog(int priority, const char* format, ...) {
       case LOG_INFO:  level = " info"; break;
     }
     printf("fsnotifier[%d] %s: ", getpid(), level);
+
+    va_start(ap, format);
     vprintf(format, ap);
+    va_end(ap);
+
     printf("\n");
   }
-
-  va_end(ap);
 }