Commit df33a7d
committed
Use strscpy rather than strlcpy (keep as fallback).
strscpy has been around since 4.3, and strlcpy got removed in 6.8.
This patch switches to the plainly preferred strscpy whenever it is
available, but will define that to strlcpy if strscpy (sized_strscpy due
to strscpy really being a macro) is not available.
Ideally we want to compile a test-call, but kbuild_test_symbol() doesn't
work that way.
We could also simply go "#ifndef strscpy ... # define strscpy strlcpy"
if that would be preferred.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>1 parent c5158c4 commit df33a7d
3 files changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
181 | 185 | | |
182 | 186 | | |
183 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
4092 | 4093 | | |
4093 | 4094 | | |
4094 | 4095 | | |
4095 | | - | |
| 4096 | + | |
4096 | 4097 | | |
4097 | 4098 | | |
4098 | 4099 | | |
| |||
5691 | 5692 | | |
5692 | 5693 | | |
5693 | 5694 | | |
5694 | | - | |
| 5695 | + | |
5695 | 5696 | | |
5696 | 5697 | | |
5697 | 5698 | | |
| |||
5701 | 5702 | | |
5702 | 5703 | | |
5703 | 5704 | | |
5704 | | - | |
| 5705 | + | |
5705 | 5706 | | |
5706 | 5707 | | |
5707 | 5708 | | |
| |||
5711 | 5712 | | |
5712 | 5713 | | |
5713 | 5714 | | |
5714 | | - | |
| 5715 | + | |
5715 | 5716 | | |
5716 | 5717 | | |
5717 | 5718 | | |
| |||
5728 | 5729 | | |
5729 | 5730 | | |
5730 | 5731 | | |
5731 | | - | |
| 5732 | + | |
5732 | 5733 | | |
5733 | 5734 | | |
5734 | 5735 | | |
| |||
0 commit comments