summaryrefslogtreecommitdiff
path: root/tools/docs/lib/parse_data_structs.py
diff options
context:
space:
mode:
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>2025-09-22 11:22:31 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-10-13 21:19:12 +0200
commit67434ce57c7eb9a250125e159cb7ef8a3f764d3f (patch)
treecc07be5ef3d00d916b64756f944d4a82f834553a /tools/docs/lib/parse_data_structs.py
parent3a8660878839faadb4f1a6dd72c3179c1df56787 (diff)
PM: sleep: Replace snprintf() with scnprintf() in show_trace_dev_match()
Replace snprintf() with scnprintf() in show_trace_dev_match() to simplify buffer length handling. The scnprintf() function returns the number of characters actually written (excluding the null terminator), which eliminates the need for manual length checking and clamping. This change removes the redundant size check since scnprintf() guarantees that the return value will never exceed the buffer size, making the code cleaner and less error-prone. Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Link: https://patch.msgid.link/20250922055231.3523680-1-kaushlendra.kumar@intel.com [ rjw: Subject adjustment ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/docs/lib/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions