]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: constify a few things
authorLennart Poettering <lennart@poettering.net>
Wed, 28 Oct 2015 11:43:52 +0000 (12:43 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 31 Oct 2015 18:09:20 +0000 (19:09 +0100)
src/basic/fdset.c
src/basic/fdset.h
src/core/manager.c

index 4b11e4ea092013f58c6425c7c2d5481db9923f5b..42b0b2b98f635eaa33c8a5b2c7c24e537264d2b0 100644 (file)
@@ -44,7 +44,7 @@ FDSet *fdset_new(void) {
         return MAKE_FDSET(set_new(NULL));
 }
 
-int fdset_new_array(FDSet **ret, int *fds, unsigned n_fds) {
+int fdset_new_array(FDSet **ret, const int *fds, unsigned n_fds) {
         unsigned i;
         FDSet *s;
         int r;
index 340438d7c401ce9cc4565242e46f11b34801a7dd..70d8acbcff3434e5e0983f1a93eeaea391d5afe1 100644 (file)
@@ -35,7 +35,7 @@ int fdset_consume(FDSet *s, int fd);
 bool fdset_contains(FDSet *s, int fd);
 int fdset_remove(FDSet *s, int fd);
 
-int fdset_new_array(FDSet **ret, int *fds, unsigned n_fds);
+int fdset_new_array(FDSet **ret, const int *fds, unsigned n_fds);
 int fdset_new_fill(FDSet **ret);
 int fdset_new_listen_fds(FDSet **ret, bool unset);
 
index d161e6c57bd20c2775e22c74530e6dfff9fb46b7..8decfd472f4083330721cdce8de2dd9a76a04099 100644 (file)
@@ -1488,7 +1488,7 @@ static unsigned manager_dispatch_dbus_queue(Manager *m) {
         return n;
 }
 
-static void manager_invoke_notify_message(Manager *m, Unit *u, pid_t pid, char *buf, size_t n, FDSet *fds) {
+static void manager_invoke_notify_message(Manager *m, Unit *u, pid_t pid, const char *buf, size_t n, FDSet *fds) {
         _cleanup_strv_free_ char **tags = NULL;
 
         assert(m);
@@ -1618,7 +1618,7 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t
         return 0;
 }
 
-static void invoke_sigchld_event(Manager *m, Unit *u, siginfo_t *si) {
+static void invoke_sigchld_event(Manager *m, Unit *u, const siginfo_t *si) {
         assert(m);
         assert(u);
         assert(si);