]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
sched: Mark argument of task_get_notification() as const.
authorAndre Noll <maan@systemlinux.org>
Tue, 31 Dec 2013 02:15:42 +0000 (02:15 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 25 May 2014 13:36:37 +0000 (15:36 +0200)
We never write to the memory pointed to by the argument.

sched.c
sched.h

diff --git a/sched.c b/sched.c
index 86069029f2820a4844fd296a423617a95ae0b4c5..85f4238b1233de58adcf07e8ac3265a1cbab9f0d 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -203,7 +203,7 @@ void task_notify(struct task *t, int err)
  *
  * \sa \ref task_notify().
  */
-int task_get_notification(struct task *t)
+int task_get_notification(const struct task *t)
 {
        return t->notification;
 }
diff --git a/sched.h b/sched.h
index c706b5093fba47f3173cc183daa07f0b77120a48..303877a4435d0b31fc779ac03d68e20326af17b2 100644 (file)
--- a/sched.h
+++ b/sched.h
@@ -80,7 +80,7 @@ int schedule(struct sched *s);
 char *get_task_list(struct sched *s);
 void task_notify(struct task *t, int err);
 void task_notify_all(struct sched *s, int err);
-int task_get_notification(struct task *t);
+int task_get_notification(const struct task *t);
 void sched_min_delay(struct sched *s);
 void sched_request_timeout(struct timeval *to, struct sched *s);
 void sched_request_timeout_ms(long unsigned ms, struct sched *s);