diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-09-18 16:51:16 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-09-21 18:31:19 +0200 |
commit | 6cb9c8637c672584d4915559001020237840acba (patch) | |
tree | d1d32b56e1e58297d6fcf43021e836249d44ac15 /tools/power | |
parent | e621198016e99cddc097d32cd3b56b15cee27d91 (diff) | |
download | linux-6cb9c8637c672584d4915559001020237840acba.tar.gz linux-6cb9c8637c672584d4915559001020237840acba.tar.bz2 linux-6cb9c8637c672584d4915559001020237840acba.zip |
platform/x86: think-lmi: Use strreplace() to replace a character by nul
We can replace
p = strchrnul(str, '$OLD');
*p = '\0';
with
strreplace(str, '$OLD', '\0');
that does the compatible modification without a need of the temporary variable.
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230918135116.1248560-2-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'tools/power')
0 files changed, 0 insertions, 0 deletions