From 66978103a6a0f7a8ca48fd4b31eeb25bc6b985d4 Mon Sep 17 00:00:00 2001 From: Inaky Perez-Gonzalez Date: Mon, 26 Jan 2009 11:29:57 -0800 Subject: libwimaxll: fix wimaxll_recv() mismatched return value declaration and printf format Fix to bug http://linuxwimax.org/bugzilla/show_bug.cgi?id=2 reported by Paul Donohue. Undetected mistmatches in wimaxll_recv(): - declared and defined return types - print format caught by a 64-bit build. Signed-off-by: Inaky Perez-Gonzalez --- include/wimaxll.h | 2 +- lib/op-open.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wimaxll.h b/include/wimaxll.h index fe3275d..97d11f9 100644 --- a/include/wimaxll.h +++ b/include/wimaxll.h @@ -309,7 +309,7 @@ const char *wimaxll_ifname(const struct wimaxll_handle *); /* Wait for data from the kernel, execute callbacks */ int wimaxll_recv_fd(struct wimaxll_handle *); -int wimaxll_recv(struct wimaxll_handle *); +ssize_t wimaxll_recv(struct wimaxll_handle *); /* Default (bidirectional) message pipe from the kernel */ ssize_t wimaxll_msg_write(struct wimaxll_handle *, const char *, diff --git a/lib/op-open.c b/lib/op-open.c index e7630d1..2d5b480 100644 --- a/lib/op-open.c +++ b/lib/op-open.c @@ -250,7 +250,7 @@ ssize_t wimaxll_recv(struct wimaxll_handle *wmx) } while ((ctx.result == -EINPROGRESS || ctx.result == -ENODATA) && result >= 0); if (result < 0) - wimaxll_msg(wmx, "E: %s: nl_recvmgsgs failed: %d\n", + wimaxll_msg(wmx, "E: %s: nl_recvmgsgs failed: %zd\n", __func__, result); else result = ctx.result; -- cgit v1.2.3