time: Correct the *settime* parameters
Both settimeofday() and clock_settime() promise with a 'const' attribute not to alter the arguments passed in. This patch adds the missing 'const' attribute into the various kernel functions implementing these calls. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Acked-by: John Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134417.545698637@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Thomas Gleixner
parent
7cf37e87dd
commit
1e6d767924
@@ -192,7 +192,7 @@ static int common_clock_get(clockid_t which_clock, struct timespec *tp)
|
||||
}
|
||||
|
||||
static inline int common_clock_set(const clockid_t which_clock,
|
||||
struct timespec *tp)
|
||||
const struct timespec *tp)
|
||||
{
|
||||
return do_sys_settimeofday(tp, NULL);
|
||||
}
|
||||
@@ -928,7 +928,7 @@ void exit_itimers(struct signal_struct *sig)
|
||||
}
|
||||
|
||||
/* Not available / possible... functions */
|
||||
int do_posix_clock_nosettime(const clockid_t clockid, struct timespec *tp)
|
||||
int do_posix_clock_nosettime(const clockid_t clockid, const struct timespec *tp)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user