Re: [PATCH BlueZ] client/gatt: Fix pointer assigned with character literal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>:

On Tue, 25 Mar 2025 08:35:47 +0000 you wrote:
> A character literl, '\0', is assigned to the pointer. The corresponding
> comment doesn't make any sense, since '\0' represents zero and this
> statement does the same thing as assigning value with NULL.
> 
> Initializing value with NULL (or zero) is safe and correct here: the
> only case that the initial value of the pointer is passed to
> write_value() is that the if branch isn't executed, where len keeps its
> initial value, zero, as well. With src_len equal to zero, write_value()
> will bail out and src_val won't be dereferenced.
> 
> [...]

Here is the summary with links:
  - [BlueZ] client/gatt: Fix pointer assigned with character literal
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=0f0039045088

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html






[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux