diff --git a/tools/parser/avdtp.c b/tools/parser/avdtp.c
index 2dd2477..6836058 100644
--- a/tools/parser/avdtp.c
+++ b/tools/parser/avdtp.c
nsp = (hdr & 0x0c) == 0x04 ? get_u8(frm) : 0;
sid = hdr & 0x08 ? 0x00 : get_u8(frm);
- printf("AVDTP(s): %s %s: transaction %d\n",
- hdr & 0x08 ? pt2str(hdr) : si2str(sid), mt2str(hdr), hdr >> 4);
+ printf("AVDTP(s): %s %s: transaction %d nsp 0x%02x\n",
+ hdr & 0x08 ? pt2str(hdr) : si2str(sid),
+ mt2str(hdr), hdr >> 4, nsp);
switch (sid & 0x7f) {
case 0x01:
diff --git a/tools/parser/bpa.c b/tools/parser/bpa.c
index 291d4ca..016f1bd 100644
--- a/tools/parser/bpa.c
+++ b/tools/parser/bpa.c
channel = get_u8(frm);
p_indent(level, frm);
- printf("BPA: id %d num %d status 0x%02x time %d channel %d\n",
- id, num, status, time, channel);
+ printf("BPA: id %d num %d len %u status 0x%02x time %d channel %d\n",
+ id, num, len, status, time, channel);
raw_dump(level, frm);
}
diff --git a/tools/parser/capi.c b/tools/parser/capi.c
index 788f4bd..f8cba3e 100644
--- a/tools/parser/capi.c
+++ b/tools/parser/capi.c
static void cmd_data_b3(int level, uint8_t subcmd, struct frame *frm)
{
uint32_t data;
- uint64_t data64;
uint16_t length, handle, flags, info;
cmd_common(level, 0x00, frm);
printf("Flags: 0x%04x\n", flags);
if (data == 0)
- data64 = get_u64(frm);
+ (void) get_u64(frm);
raw_dump(level, frm);
}
diff --git a/tools/parser/hci.c b/tools/parser/hci.c
index e4a3633..b85cc14 100644
--- a/tools/parser/hci.c
+++ b/tools/parser/hci.c
uint8_t flags = acl_flags(handle);
int len;
- if (frm->audio_fd > fileno(stderr))
+ if (frm->audio_fd > fileno(stderr)) {
len = write(frm->audio_fd, frm->ptr + HCI_SCO_HDR_SIZE, hdr->dlen);
+ if (len < 0)
+ return;
+ }
if (!p_filter(FILT_SCO)) {
p_indent(level, frm);
diff --git a/tools/parser/ppp.c b/tools/parser/ppp.c
index 875e5df..99165c4 100644
--- a/tools/parser/ppp.c
+++ b/tools/parser/ppp.c
id = 0x07;
err = write(frm->pppdump_fd, &id, 1);
+ if (err < 0)
+ return;
+
err = write(frm->pppdump_fd, &ts, 4);
+ if (err < 0)
+ return;
id = frm->in ? 0x02 : 0x01;
err = write(frm->pppdump_fd, &id, 1);
+ if (err < 0)
+ return;
err = write(frm->pppdump_fd, &len, 2);
+ if (err < 0)
+ return;
err = write(frm->pppdump_fd, frm->ptr, frm->len);
+ if (err < 0)
+ return;
}
if (!ppp_traffic) {
diff --git a/tools/parser/rfcomm.c b/tools/parser/rfcomm.c
index c2a278d..25e7ae1 100644
--- a/tools/parser/rfcomm.c
+++ b/tools/parser/rfcomm.c
address_field addr = head->addr;
uint8_t ctr = head->control;
uint16_t ilen = head->length.bits.len;
- uint8_t ctr_type,pf,dlci,fcs;
+ uint8_t pf, dlci, fcs;
dlci = GET_DLCI(addr);
pf = GET_PF(ctr);
- ctr_type = CLR_PF(ctr);
fcs = *(ptr + len - 1);
printf("cr %d dlci %d pf %d ilen %d fcs 0x%x ", addr.cr, dlci, pf, ilen, fcs);