]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev: modernize ctrl_send and use PROJECT_VERSION
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 21 Dec 2018 12:36:26 +0000 (13:36 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 21 Dec 2018 12:36:26 +0000 (13:36 +0100)
commitb9da6a098b08d4eafec239fc05e0fd2073115504
treef3eca7305463efa9b49fb87a59a13cc04db87a56
parenta67c318df8800ba98d7361308937ed276dc73982
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.
src/udev/udev-ctrl.c