Commit e033e1b
block: Replace deprecated strcpy in devt_from_devname
Use strnlen() and sizeof(s) instead of hard-coding 31 bytes.
strcpy() is deprecated and uses an additional strlen() internally; use
memcpy() directly since we already know the length of 'name' and that it
is guaranteed to be NUL-terminated.
Link: KSPP/linux#88
Signed-off-by: Thorsten Blum <[email protected]>1 parent 83d3e2f commit e033e1b
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
158 | 159 | | |
159 | | - | |
| 160 | + | |
160 | 161 | | |
161 | | - | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
0 commit comments