From 34df5a34e1d0ac4bba453fb5f52f18a2f5f260f9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 9 Mar 2011 19:48:02 +0100 Subject: [PATCH] drop unnecessary suffix NULs as gcc adds them anyway --- TODO | 4 ++++ src/dbus-device.c | 3 +-- src/dbus-job.c | 3 +-- src/dbus-mount.c | 3 +-- src/dbus-service.c | 3 +-- src/dbus-socket.c | 4 ++-- src/dbus-swap.c | 3 +-- src/dbus-timer.c | 3 +-- src/dbus-unit.c | 3 +-- src/dbus.c | 1 + src/mount-setup.c | 3 +-- src/util.c | 6 ++---- 12 files changed, 17 insertions(+), 22 deletions(-) diff --git a/TODO b/TODO index ad844d5c..237ba7b2 100644 --- a/TODO +++ b/TODO @@ -22,6 +22,10 @@ F15: * drop SIGHUP handling from rsyslog.service upstream +* teach dbus to activate all services it finds in /etc/systemd/services/org-*.service + +* save/restore tool for SysV as requested by FPC + Features: * consider services with no [Install] section and stored in /lib enabled by "systemctl is-enabled" diff --git a/src/dbus-device.c b/src/dbus-device.c index aafe5d61..9b2861de 100644 --- a/src/dbus-device.c +++ b/src/dbus-device.c @@ -40,8 +40,7 @@ const char bus_device_interface[] _introspect_("Device") = BUS_DEVICE_INTERFACE; const char bus_device_invalidating_properties[] = - "SysFSPath\0" - "\0"; + "SysFSPath\0"; DBusHandlerResult bus_device_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) { const BusProperty properties[] = { diff --git a/src/dbus-job.c b/src/dbus-job.c index e90d585b..95367c42 100644 --- a/src/dbus-job.c +++ b/src/dbus-job.c @@ -46,8 +46,7 @@ const char bus_job_interface[] _introspect_("Job") = BUS_JOB_INTERFACE; #define INVALIDATING_PROPERTIES \ - "State\0" \ - "\0" \ + "State\0" static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_job_append_state, job_state, JobState); static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_job_append_type, job_type, JobType); diff --git a/src/dbus-mount.c b/src/dbus-mount.c index fa319feb..e3a793d1 100644 --- a/src/dbus-mount.c +++ b/src/dbus-mount.c @@ -59,8 +59,7 @@ const char bus_mount_invalidating_properties[] = "ExecMount\0" "ExecUnmount\0" "ExecRemount\0" - "ControlPID\0" - "\0"; + "ControlPID\0"; static int bus_mount_append_what(Manager *n, DBusMessageIter *i, const char *property, void *data) { Mount *m = data; diff --git a/src/dbus-service.c b/src/dbus-service.c index 93fc2a3b..1b6c7f47 100644 --- a/src/dbus-service.c +++ b/src/dbus-service.c @@ -102,8 +102,7 @@ const char bus_service_invalidating_properties[] = "ExecMain\0" "MainPID\0" "ControlPID\0" - "StatusText\0" - "\0"; + "StatusText\0"; static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_service_append_type, service_type, ServiceType); static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_service_append_restart, service_restart, ServiceRestart); diff --git a/src/dbus-socket.c b/src/dbus-socket.c index a9cb1c38..3fda76db 100644 --- a/src/dbus-socket.c +++ b/src/dbus-socket.c @@ -73,12 +73,12 @@ const char bus_socket_invalidating_properties[] = "ExecStopPost\0" "ControlPID\0" "NAccepted\0" - "NConnections\0" - "\0"; + "NConnections\0"; static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_socket_append_bind_ipv6_only, socket_address_bind_ipv6_only, SocketAddressBindIPv6Only); DBusHandlerResult bus_socket_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) { + const BusProperty properties[] = { BUS_UNIT_PROPERTIES, { "org.freedesktop.systemd1.Socket", "BindIPv6Only", bus_socket_append_bind_ipv6_only, "s", &u->socket.bind_ipv6_only }, diff --git a/src/dbus-swap.c b/src/dbus-swap.c index 06acb22d..723cd64a 100644 --- a/src/dbus-swap.c +++ b/src/dbus-swap.c @@ -54,8 +54,7 @@ const char bus_swap_invalidating_properties[] = "Priority\0" "ExecActivate\0" "ExecDeactivate\0" - "ControlPID\0" - "\0"; + "ControlPID\0"; static int bus_swap_append_priority(Manager *m, DBusMessageIter *i, const char *property, void *data) { Swap *s = data; diff --git a/src/dbus-timer.c b/src/dbus-timer.c index f4c23e0e..eed05e69 100644 --- a/src/dbus-timer.c +++ b/src/dbus-timer.c @@ -46,8 +46,7 @@ const char bus_timer_interface[] _introspect_("Timer") = BUS_TIMER_INTERFACE; const char bus_timer_invalidating_properties[] = "Timers\0" - "NextElapseUSec\0" - "\0"; + "NextElapseUSec\0"; static int bus_timer_append_timers(Manager *m, DBusMessageIter *i, const char *property, void *data) { Timer *p = data; diff --git a/src/dbus-unit.c b/src/dbus-unit.c index cd6ad843..52e8599e 100644 --- a/src/dbus-unit.c +++ b/src/dbus-unit.c @@ -37,8 +37,7 @@ const char bus_unit_interface[] _introspect_("Unit") = BUS_UNIT_INTERFACE; "ActiveExitTimestamp\0" \ "InactiveEnterTimestamp\0" \ "Job\0" \ - "NeedDaemonReload\0" \ - "\0" + "NeedDaemonReload\0" int bus_unit_append_names(Manager *m, DBusMessageIter *i, const char *property, void *data) { char *t; diff --git a/src/dbus.c b/src/dbus.c index 5a4750d6..dae5f9ec 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -1316,6 +1316,7 @@ DBusHandlerResult bus_default_message_handler(Manager *m, DBusConnection *c, DBu if (!dbus_message_iter_close_container(&iter, &sub)) goto oom; + } else if (dbus_message_is_method_call(message, "org.freedesktop.DBus.Properties", "Set") && properties) { const char *interface, *property; DBusMessageIter iter; diff --git a/src/mount-setup.c b/src/mount-setup.c index f08eeb16..09ee07f8 100644 --- a/src/mount-setup.c +++ b/src/mount-setup.c @@ -228,8 +228,7 @@ int mount_setup(void) { "/proc/self/fd\0" "/dev/fd\0" "/proc/self/fd/0\0" "/dev/stdin\0" "/proc/self/fd/1\0" "/dev/stdout\0" - "/proc/self/fd/2\0" "/dev/stderr\0" - "\0"; + "/proc/self/fd/2\0" "/dev/stderr\0"; int r; unsigned i; diff --git a/src/util.c b/src/util.c index 96cf6605..4acb3c30 100644 --- a/src/util.c +++ b/src/util.c @@ -3820,8 +3820,7 @@ int detect_vm(const char **id) { "Microsoft Corporation\0" "microsoft\0" "innotek GmbH\0" "oracle\0" "Xen\0" "xen\0" - "Bochs\0" "bochs\0" - "\0"; + "Bochs\0" "bochs\0"; static const char cpuid_vendor_table[] = "XenVMMXenVMM\0" "xen\0" @@ -3829,8 +3828,7 @@ int detect_vm(const char **id) { /* http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1009458 */ "VMwareVMware\0" "vmware\0" /* http://msdn.microsoft.com/en-us/library/ff542428.aspx */ - "Microsoft Hv\0" "microsoft\0" - "\0"; + "Microsoft Hv\0" "microsoft\0"; uint32_t eax, ecx; union { -- 2.39.5