X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fpoll-loop.c;h=32bbc13490b38486474c111c935fa7ba71b60605;hb=586bb84a49efa62a56e9aed2a345e01679dcccca;hp=aff2c335c732b88a0afa9152422d038c25b06039;hpb=a14bc59fb8f27db193d74662dc9c5cb8237177ef;p=openvswitch diff --git a/lib/poll-loop.c b/lib/poll-loop.c index aff2c335..32bbc134 100644 --- a/lib/poll-loop.c +++ b/lib/poll-loop.c @@ -18,6 +18,7 @@ #include "poll-loop.h" #include #include +#include #include #include #include @@ -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;