aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bluetooth')
-rw-r--r--usr.sbin/bluetooth/bthidd/parser.y4
-rw-r--r--usr.sbin/bluetooth/bthidd/server.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/bluetooth/bthidd/parser.y b/usr.sbin/bluetooth/bthidd/parser.y
index 7a95d26a528d..eda82f649652 100644
--- a/usr.sbin/bluetooth/bthidd/parser.y
+++ b/usr.sbin/bluetooth/bthidd/parser.y
@@ -315,12 +315,12 @@ print_hid_device(hid_device_p hid_device, FILE *f)
for (i = 0; i < desc->size; i ++) {
if ((i % 8) == 0)
- fprintf(stdout, "\n ");
+ fprintf(f, "\n ");
fprintf(f, "0x%2.2x ", desc->data[i]);
}
- fprintf(stdout,
+ fprintf(f,
"\n" \
" };\n" \
"}\n");
diff --git a/usr.sbin/bluetooth/bthidd/server.c b/usr.sbin/bluetooth/bthidd/server.c
index e2f716e22170..ad2c82835f43 100644
--- a/usr.sbin/bluetooth/bthidd/server.c
+++ b/usr.sbin/bluetooth/bthidd/server.c
@@ -332,7 +332,8 @@ server_process(bthid_server_p srv, int fd)
char data[1024];
int len;
- assert(s != NULL);
+ if (s == NULL)
+ return (0); /* can happen on device disconnect */
do {
len = read(fd, data, sizeof(data));