Merge "master" branch into "db".
[sliver-openvswitch.git] / lib / poll-loop.c
index aff2c33..32bbc13 100644 (file)
@@ -18,6 +18,7 @@
 #include "poll-loop.h"
 #include <assert.h>
 #include <errno.h>
+#include <inttypes.h>
 #include <poll.h>
 #include <stdlib.h>
 #include <string.h>
@@ -122,7 +123,7 @@ log_wakeup(const struct backtrace *backtrace, const char *format, ...)
 
         ds_put_char(&ds, ':');
         for (i = 0; i < backtrace->n_frames; i++) {
-            ds_put_format(&ds, " 0x%x", backtrace->frames[i]);
+            ds_put_format(&ds, " 0x%"PRIxPTR, backtrace->frames[i]);
         }
     }
     VLOG_DBG("%s", ds_cstr(&ds));
@@ -253,7 +254,7 @@ poll_cancel(struct poll_waiter *pw)
 static struct poll_waiter *
 new_waiter(int fd, short int events)
 {
-    struct poll_waiter *waiter = xcalloc(1, sizeof *waiter);
+    struct poll_waiter *waiter = xzalloc(sizeof *waiter);
     assert(fd >= 0);
     waiter->fd = fd;
     waiter->events = events;