Commit b9da6a0
committed
udev: modernize ctrl_send and use PROJECT_VERSION
PROJECT_VERSION is used in preparation for future changes. Let's simplify the
code by using structured initialization. If the string written to .version ever
became to long, the compiler will truncate it and tell us:
../src/udev/udev-ctrl.c: In function ‘ctrl_send’:
../src/udev/udev-ctrl.c:221:28: warning: initializer-string for array of chars is too long
.version = "udev-" STRINGIFY(R_VERSION),
^~~~~~~
../src/udev/udev-ctrl.c:221:28: note: (near initialization for ‘ctrl_msg_wire.version’)
No functional change.1 parent a67c318 commit b9da6a0
1 file changed
+19
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
224 | 222 | | |
225 | 223 | | |
226 | 224 | | |
227 | 225 | | |
228 | 226 | | |
229 | 227 | | |
230 | 228 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
| 229 | + | |
| 230 | + | |
235 | 231 | | |
236 | 232 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 233 | + | |
| 234 | + | |
241 | 235 | | |
242 | 236 | | |
243 | 237 | | |
244 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
245 | 242 | | |
246 | 243 | | |
247 | | - | |
248 | | - | |
249 | | - | |
| 244 | + | |
250 | 245 | | |
251 | 246 | | |
252 | 247 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 248 | + | |
260 | 249 | | |
261 | | - | |
262 | 250 | | |
263 | | - | |
264 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
265 | 255 | | |
266 | | - | |
267 | | - | |
268 | 256 | | |
269 | 257 | | |
270 | 258 | | |
| |||
0 commit comments