diff options
author | Kevin Lo <kevlo@FreeBSD.org> | 2007-09-11 01:59:00 +0000 |
---|---|---|
committer | Kevin Lo <kevlo@FreeBSD.org> | 2007-09-11 01:59:00 +0000 |
commit | 817e1ec9015d16ab6520cbb7e076d1e507c8ad67 (patch) | |
tree | 59f0c9d34dbf343a960445af3f73897e29a2e84a /usr.bin | |
parent | b979e69bf6831530d8fc25a2b93aed84da61f26f (diff) | |
download | src-817e1ec9015d16ab6520cbb7e076d1e507c8ad67.tar.gz src-817e1ec9015d16ab6520cbb7e076d1e507c8ad67.zip |
Check return value of listen().
Reviewed by: emax
Approved by: re (kensmith)
Notes
Notes:
svn path=/head/; revision=172142
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c | 3 |
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 4c37d5f073e4..deffb2ea2978 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) |