monitor: Fix runtime error
Luiz Augusto von Dentz
maintainerPATCH 1/1 monitor: Fix runtime error
From: Luiz Augusto von Dentz <[email protected]>
This fixes the following runtime error:
monitor/packet.c:10476:2: runtime error: division by zero Floating point exception
--- monitor/packet.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
monitor/packet.c +8 -5
@@ -10473,11 +10473,14 @@ static void packet_dequeue_tx(struct timeval *tv, uint16_t handle)packet_latency_add (&conn->tx_l, &delta); -print_field ("#%zu: len %zu (%lld Kb/s)" , frame->num, frame->len, - frame->len *8 /TV_MSEC (delta)); -print_field ("Latency: %lld msec (%lld-%lld msec ~%lld msec)" , -TV_MSEC (delta),TV_MSEC (conn->tx_l.min), -TV_MSEC (conn->tx_l.max),TV_MSEC (conn->tx_l.med)); +if (TV_MSEC (delta)) { +print_field ("#%zu: len %zu (%lld Kb/s)" , frame->num, frame->len, + frame->len *8 /TV_MSEC (delta)); +print_field ("Latency: %lld msec (%lld-%lld msec ~%lld msec)" , +TV_MSEC (delta),TV_MSEC (conn->tx_l.min), +TV_MSEC (conn->tx_l.max), +TV_MSEC (conn->tx_l.med)); + }l2cap_dequeue_frame (&delta, conn);
Signature · 1 line
2.41.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=780953
---Test result---
Test Summary:
CheckPatch PASS 0.48 seconds GitLint PASS 0.32 seconds BuildEll PASS 33.86 seconds BluezMake PASS 1025.75 seconds MakeCheck PASS 13.10 seconds MakeDistcheck PASS 190.23 seconds CheckValgrind PASS 309.83 seconds CheckSmatch WARNING 407.76 seconds bluezmakeextell PASS 124.64 seconds IncrementalBuild PASS 817.95 seconds ScanBuild PASS 1254.40 seconds
Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1856:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3606:52: warning: array of flexible structuresmonitor/bt.h:3594:40: warning: array of flexible structures
---
Regards,
Linux Bluetooth
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 8 lines · On Thu, 31 Aug 2023 14:05:54 -0700 you wrote:
From: Luiz Augusto von Dentz <[email protected]>
This fixes the following runtime error:
monitor/packet.c:10476:2: runtime error: division by zero Floating point exception[...]
Here is the summary with links:
- [BlueZ] monitor: Fix runtime error
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c7fd9310b925
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html