Commit 1d97b8e
thermal: core: Use strnlen() in thermal_zone_device_register_with_trips()
Replace strlen() with the safer strnlen() and calculate the length of
the thermal zone name 'type' only once.
No functional changes.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
[ rjw: Subject edits ]
Link: https://patch.msgid.link/20251216130943.40180-2-thorsten.blum@linux.dev
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>1 parent 9ace475 commit 1d97b8e
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1505 | 1505 | | |
1506 | 1506 | | |
1507 | 1507 | | |
| 1508 | + | |
1508 | 1509 | | |
1509 | 1510 | | |
1510 | 1511 | | |
1511 | | - | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
1512 | 1516 | | |
1513 | 1517 | | |
1514 | 1518 | | |
1515 | 1519 | | |
1516 | | - | |
| 1520 | + | |
1517 | 1521 | | |
1518 | 1522 | | |
1519 | 1523 | | |
| |||
0 commit comments