]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
LOG() calls changed to variadic form.
authorOliver Kurth <okurth@vmware.com>
Fri, 22 Nov 2019 22:52:35 +0000 (14:52 -0800)
committerOliver Kurth <okurth@vmware.com>
Fri, 22 Nov 2019 22:52:35 +0000 (14:52 -0800)
open-vm-tools/lib/pollGtk/pollGtk.c

index 2225dd43c3ac7951bdae68476a5b84826c6038ca..da42e189f0ecced3afe9f8f1b37394c126cc3ea8 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2004-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2004-2019 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -60,6 +60,7 @@
 #include "err.h"
 
 #define LOGLEVEL_MODULE poll
+#define LOGLEVEL_VARIADIC
 #include "loglevel_user.h"
 
 
@@ -164,13 +165,13 @@ static void PollGtkRemoveOneCallback(gpointer data);
 #define LOG_ENTRY(_l, _str, _e, _isWrite)                                     \
    do {                                                                       \
       if (_isWrite) {                                                         \
-         LOG(_l, ("POLL: entry %p (wcb %p, data %p, flags %x, type %x)" _str, \
-                  (_e), (_e)->write.cb, (_e)->write.clientData,               \
-                  (_e)->write.flags, (_e)->type));                            \
+         LOG(_l, "POLL: entry %p (wcb %p, data %p, flags %x, type %x)" _str,  \
+             (_e), (_e)->write.cb, (_e)->write.clientData,                    \
+             (_e)->write.flags, (_e)->type);                                  \
       } else {                                                                \
-         LOG(_l, ("POLL: entry %p (rcb %p, data %p, flags %x, type %x)" _str, \
-                  (_e), (_e)->read.cb, (_e)->read.clientData,                 \
-                  (_e)->read.flags, (_e)->type));                             \
+         LOG(_l, "POLL: entry %p (rcb %p, data %p, flags %x, type %x)" _str,  \
+             (_e), (_e)->read.cb, (_e)->read.clientData,                      \
+             (_e)->read.flags, (_e)->type);                                   \
       }                                                                       \
    } while (0)
 
@@ -463,8 +464,8 @@ PollGtkFireSignaled(gpointer key,        // IN: PollDevHandle
    PollGtkEventCallbackWork(NULL, condition, entry, TRUE, &firedAll);
 
 exit:
-   LOG(4, ("POLL: entry %p %s\n", entry, entry && condition ?
-           (firedAll ? "fired" : "not all fired") : "not ready to fire"));
+   LOG(4, "POLL: entry %p %s\n", entry, entry && condition ?
+       (firedAll ? "fired" : "not all fired") : "not ready to fire");
    return firedAll;
 }
 
@@ -522,10 +523,10 @@ PollGtkFireSignaledList(gpointer data) // IN: unused
 
    /* Return TRUE to keep this function firing, FALSE to unregister. */
    if (g_hash_table_size(poll->signaledTable) > 0) {
-      LOG(5, ("POLL: not removing retry source\n"));
+      LOG(5, "POLL: not removing retry source\n");
       ret = TRUE;
    } else {
-      LOG(5, ("POLL: no retry remains; removing timer source\n"));
+      LOG(5, "POLL: no retry remains; removing timer source\n");
       poll->retrySource = 0;
       ret = FALSE;
    }
@@ -571,16 +572,16 @@ PollGtkAddToSignaledList(PollGtkEntry *entry)  // IN
    if (poll->signaledInUse) {
       if (!g_slist_find(poll->newSignaled, key)) {
          poll->newSignaled = g_slist_prepend(poll->newSignaled, key);
-         LOG(4, ("POLL: added entry %p event 0x%x to signaled list\n",
-                 entry, entry->event));
+         LOG(4, "POLL: added entry %p event 0x%x to signaled list\n",
+             entry, entry->event);
       }
    } else {
       g_hash_table_replace(poll->signaledTable, key, entry);
       if (poll->retrySource == 0) {
          poll->retrySource = g_timeout_add(0, PollGtkFireSignaledList, NULL);
       }
-      LOG(4, ("POLL: added entry %p event 0x%x to signaled hash table\n",
-              entry, entry->event));
+      LOG(4, "POLL: added entry %p event 0x%x to signaled hash table\n",
+          entry, entry->event);
    }
 }
 
@@ -652,8 +653,8 @@ PollGtkWritableSocketCheck(PollGtkEntry *entry)  // IN
    ret = send(entry->event, &c, 0, 0);
    if (ret == SOCKET_ERROR) {
       if (GetLastError() != WSAEWOULDBLOCK) {
-         LOG(1, ("POLL error while doing zero-byte send: %u %s\n",
-                 GetLastError(), Err_ErrString()));
+         LOG(1, "POLL error while doing zero-byte send: %u %s\n",
+             GetLastError(), Err_ErrString());
       }
       return FALSE;
    } else {
@@ -793,7 +794,7 @@ PollGtkCallbackRemoveEntry(PollGtkEntry *foundEntry,  // IN
       LOG_ENTRY(2, " to be removed\n", foundEntry, FALSE);
       if (!g_hash_table_remove(poll->timerTable,
                                (gpointer)(intptr_t)foundEntry->gtkInputId)) {
-         LOG(2, ("POLL: entry %p not found\n", foundEntry));
+         LOG(2, "POLL: entry %p not found\n", foundEntry);
       }
    }
 }
@@ -875,8 +876,8 @@ PollGtkCallbackRemoveInt(PollClassSet classSet,           // IN
          PollGtkCallbackRemoveEntry(foundEntry, FALSE);
       }
    } else {
-      LOG(1, ("POLL: no matching entry for cb %p, data %p, flags %x, type %x\n",
-              f, clientData, flags, type));
+      LOG(1, "POLL: no matching entry for cb %p, data %p, flags %x, type %x\n",
+          f, clientData, flags, type);
    }
 
    PollGtkUnlock();