Commit 1ac9aa41 authored by Jeff LaBundy's avatar Jeff LaBundy Committed by Dmitry Torokhov
Browse files

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: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412221136.0S4kRoCC-lkp@intel.com/


Signed-off-by: default avatarJeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/Z3rV8GTHxLyjBQ5I@nixie71


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 4f978603
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment