Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 574dd005 authored by Karthikeyan Ramasubramanian's avatar Karthikeyan Ramasubramanian
Browse files

slimbus: Fix the type usage of transaction id



Transaction ID with a type of 'u8' will always have the range 0 to 255.
Checking it against the condition <= 255 and then incrementing it will
always return true and lead to an overflow.

Fix this behavior by updating the type of transaction ID to unsigned int
and use a preprocessor macro instead of magic number to check for the
upper threshold.

Change-Id: I43ec1d3dd2cda280292d416d422c298d9f8ebf6a
Signed-off-by: default avatarKarthikeyan Ramasubramanian <kramasub@codeaurora.org>
parent cd348a49
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment