summaryrefslogtreecommitdiffstats
path: root/usr.bin/bluetooth
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2007-09-11 01:59:00 +0000
committerkevlo <kevlo@FreeBSD.org>2007-09-11 01:59:00 +0000
commitf9b7bdbbbd0a73aa3ed9d14f8275e35a75262057 (patch)
tree59f0c9d34dbf343a960445af3f73897e29a2e84a /usr.bin/bluetooth
parent54ec29e11d4db3fb7065bddb185ecbc74e38f419 (diff)
downloadFreeBSD-src-f9b7bdbbbd0a73aa3ed9d14f8275e35a75262057.zip
FreeBSD-src-f9b7bdbbbd0a73aa3ed9d14f8275e35a75262057.tar.gz
Check return value of listen().
Reviewed by: emax Approved by: re (kensmith)
Diffstat (limited to 'usr.bin/bluetooth')
-rw-r--r--usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c b/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c
index 4c37d5f..deffb2e 100644
--- a/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c
+++ b/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c
@@ -211,7 +211,8 @@ main(int argc, char *argv[])
if (bind(acceptsock, (struct sockaddr *)&ma, sizeof(ma)) < 0)
err(1, "Could not bind socket -- channel %d in use?",
channel);
- listen(acceptsock, 10);
+ if (listen(acceptsock, 10) != 0)
+ err(1, "Could not listen on socket");
ss = sdp_open_local(NULL);
if (ss == NULL)
OpenPOWER on IntegriCloud