aboutsummaryrefslogtreecommitdiff
path: root/Documentation/filesystems/caching/backend-api.rst
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2021-09-16 16:21:54 +0300
committerJiri Kosina <[email protected]>2021-09-22 11:49:17 +0200
commita68f3bd13994b315f47ec7e4da8d1c39ba0a2bb4 (patch)
tree67d6803feceac1578b37d77849e024a114afe170 /Documentation/filesystems/caching/backend-api.rst
parentf3e8252124543836d3361e5c03909168077131a7 (diff)
HID: hid-debug: clean up snprintf() checks in hid_resolv_usage()
The snprintf() limits are complicated and slightly wrong when it does: max(0, HID_DEBUG_BUFSIZE - len - 1) The "- 1" should not be there. It means we can't use the last byte of the buffer. If we change the first snprintf() to scnprintf() then we can remove the max(). At the start of the function the strlen(buf) is going always going to be < HID_DEBUG_BUFSIZE so that is safe. If it were > HID_DEBUG_BUFSIZE then that would result in a WARN(). Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
Diffstat (limited to 'Documentation/filesystems/caching/backend-api.rst')
0 files changed, 0 insertions, 0 deletions