Commit 6cb9c86
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>1 parent e621198 commit 6cb9c86
1 file changed
Lines changed: 4 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | 201 | | |
210 | 202 | | |
211 | 203 | | |
| |||
411 | 403 | | |
412 | 404 | | |
413 | 405 | | |
414 | | - | |
| 406 | + | |
415 | 407 | | |
416 | 408 | | |
417 | 409 | | |
| |||
921 | 913 | | |
922 | 914 | | |
923 | 915 | | |
924 | | - | |
| 916 | + | |
925 | 917 | | |
926 | 918 | | |
927 | 919 | | |
| |||
934 | 926 | | |
935 | 927 | | |
936 | 928 | | |
937 | | - | |
938 | | - | |
| 929 | + | |
939 | 930 | | |
940 | 931 | | |
941 | 932 | | |
| |||
1540 | 1531 | | |
1541 | 1532 | | |
1542 | 1533 | | |
1543 | | - | |
1544 | 1534 | | |
1545 | 1535 | | |
1546 | 1536 | | |
| |||
1557 | 1547 | | |
1558 | 1548 | | |
1559 | 1549 | | |
1560 | | - | |
1561 | | - | |
| 1550 | + | |
1562 | 1551 | | |
1563 | 1552 | | |
1564 | 1553 | | |
| |||
0 commit comments