diff options
author | Jeff LaBundy <jeff@labundy.com> | 2025-01-05 12:56:48 -0600 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-06-03 21:39:35 -0700 |
commit | 1ac9aa41c6af7949a040f87cf1ed4bc4cac296bf (patch) | |
tree | 3a409224381990f7fbc817139710db5f197214de /scripts/lib/kdoc/kdoc_parser.py | |
parent | 4f9786035f9e519db41375818e1d0b5f20da2f10 (diff) |
Input: iqs626a - replace snprintf() with scnprintf()
W=1 builds warn that the data written to 'tc_name' is truncated for
theoretical strings such as "channel-2147483646".
Solve this problem by replacing snprintf() with scnprintf() so that
the return value corresponds to what was actually written.
In practice, the largest string that will be written is "channel-8",
and the return value is not actually evaluated. Instead, this patch
ultimately removes the warning without unnecessarily increasing the
size of 'tc_name' from 10 bytes.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412221136.0S4kRoCC-lkp@intel.com/
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/Z3rV8GTHxLyjBQ5I@nixie71
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions