Commit bc8f7ab
ACPI: sysfs: Clean up create_pnp_modalias() and create_of_modalias()
'modalias' is only written with snprintf() and it is already guaranteed
to be nul-terminated, so remove the unneeded (but harmless) writes of a
trailing '\0' to it.
Also snprintf() never returns negative values, so remove redundant (but
harmless) checks for it.
Signed-off-by: Christophe JAILLET <[email protected]>
[ rjw: Merge two patches into one, combine changelogs, add subject ]
Signed-off-by: Rafael J. Wysocki <[email protected]>1 parent 48cf49d commit bc8f7ab
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
173 | 171 | | |
174 | 172 | | |
175 | 173 | | |
176 | 174 | | |
177 | 175 | | |
178 | 176 | | |
179 | 177 | | |
180 | | - | |
| 178 | + | |
181 | 179 | | |
182 | 180 | | |
183 | 181 | | |
| |||
228 | 226 | | |
229 | 227 | | |
230 | 228 | | |
231 | | - | |
232 | | - | |
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
236 | 232 | | |
237 | 233 | | |
238 | 234 | | |
239 | 235 | | |
240 | | - | |
| 236 | + | |
241 | 237 | | |
242 | 238 | | |
243 | 239 | | |
| |||
0 commit comments