From db9c68c76d7a9eb3f200df9d0fcaf971387cb061 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 17 Jun 2014 20:34:16 +0000 Subject: -fix channel data range to make -1 legal value --- src/transport/gnunet-helper-transport-bluetooth.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/transport/gnunet-helper-transport-bluetooth.c') diff --git a/src/transport/gnunet-helper-transport-bluetooth.c b/src/transport/gnunet-helper-transport-bluetooth.c index 2d1b67dfe..b5556c7d6 100644 --- a/src/transport/gnunet-helper-transport-bluetooth.c +++ b/src/transport/gnunet-helper-transport-bluetooth.c @@ -965,7 +965,7 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len) sdp_list_t *search_list = 0, *attrid_list = 0, *response_list = 0, *it = 0; uuid_t svc_uuid; uint32_t range = 0x0000ffff; - uint8_t channel = -1; + int channel = -1; /* Connect to the local SDP server */ session = sdp_connect (BDADDR_ANY, &dest, 0); @@ -1002,9 +1002,12 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len) sdp_close (session); - if (channel == -1) - fprintf (stderr, "Failed to find the listening channel for interface `%.*s': %s\n", - IFNAMSIZ, dev->iface, strerror (errno)); + if (-1 == channel) + fprintf (stderr, + "Failed to find the listening channel for interface `%.*s': %s\n", + IFNAMSIZ, + dev->iface, + strerror (errno)); return channel; } -- cgit v1.2.3