From b41ba1eb2b6b7a775536f803eda6fe42d8742745 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 30 Jan 2009 00:24:59 +0100 Subject: Fix signed/unsigned comparison issues within AVDTP/A2DP code --- audio/control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/control.c') diff --git a/audio/control.c b/audio/control.c index 9d21b594..5579f5c2 100644 --- a/audio/control.c +++ b/audio/control.c @@ -462,7 +462,7 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, debug("Got %d bytes of data for AVCTP session %p", ret, session); - if (ret < sizeof(struct avctp_header)) { + if ((unsigned int) ret < sizeof(struct avctp_header)) { error("Too small AVCTP packet"); goto failed; } @@ -477,7 +477,7 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, avctp->cr, avctp->ipid, ntohs(avctp->pid)); ret -= sizeof(struct avctp_header); - if (ret < sizeof(struct avrcp_header)) { + if ((unsigned int) ret < sizeof(struct avrcp_header)) { error("Too small AVRCP packet"); goto failed; } -- cgit