diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-03-12 16:33:14 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-03-12 16:33:14 -0300 |
commit | ae6e4f68f37333e3dbd6b8b89445850b87bcbfe2 (patch) | |
tree | 89d1a0cd2f07b82597b9d78843b162019f944868 /compat | |
parent | 7c27b3e218470ba0bc2beaad39635f7b3548e53a (diff) |
Fix a couple of other places that should use size_t and ssize_t
Diffstat (limited to 'compat')
-rw-r--r-- | compat/bnep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compat/bnep.c b/compat/bnep.c index e9742c7aa..0498c789f 100644 --- a/compat/bnep.c +++ b/compat/bnep.c @@ -219,7 +219,7 @@ int bnep_accept_connection(int sk, uint16_t role, char *dev) struct bnep_setup_conn_req *req; struct bnep_control_rsp *rsp; unsigned char pkt[BNEP_MTU]; - int r; + ssize_t r; r = recv(sk, pkt, BNEP_MTU, 0); if (r <= 0) @@ -227,7 +227,7 @@ int bnep_accept_connection(int sk, uint16_t role, char *dev) errno = EPROTO; - if (r < (int) sizeof(*req)) + if ((size_t) r < sizeof(*req)) return -1; req = (void *) pkt; @@ -259,7 +259,7 @@ int bnep_create_connection(int sk, uint16_t role, uint16_t svc, char *dev) struct __service_16 *s; struct timeval timeo; unsigned char pkt[BNEP_MTU]; - int r; + ssize_t r; /* Send request */ req = (void *) pkt; @@ -292,9 +292,9 @@ receive: errno = EPROTO; - if (r < (int) sizeof(*rsp)) + if ((size_t) r < sizeof(*rsp)) return -1; - + rsp = (void *) pkt; if (rsp->type != BNEP_CONTROL) return -1; |