The timeout parameter of sudo_ev_add() should be const.

This commit is contained in:
Todd C. Miller
2020-04-29 11:27:30 -06:00
parent 3b7768be76
commit 85fe30e49b
2 changed files with 4 additions and 4 deletions

View File

@@ -137,8 +137,8 @@ __dso_public int sudo_ev_set_v1(struct sudo_event *ev, int fd, short events, sud
#define sudo_ev_set(_a, _b, _c, _d, _e) sudo_ev_set_v1((_a), (_b), (_c), (_d), (_e))
/* Add an event, returns 0 on success, -1 on error */
__dso_public int sudo_ev_add_v1(struct sudo_event_base *head, struct sudo_event *ev, struct timeval *timo, bool tohead);
__dso_public int sudo_ev_add_v2(struct sudo_event_base *head, struct sudo_event *ev, struct timespec *timo, bool tohead);
__dso_public int sudo_ev_add_v1(struct sudo_event_base *head, struct sudo_event *ev, const struct timeval *timo, bool tohead);
__dso_public int sudo_ev_add_v2(struct sudo_event_base *head, struct sudo_event *ev, const struct timespec *timo, bool tohead);
#define sudo_ev_add(_a, _b, _c, _d) sudo_ev_add_v2((_a), (_b), (_c), (_d))
/* Delete an event, returns 0 on success, -1 on error */

View File

@@ -454,7 +454,7 @@ sudo_ev_add_signal(struct sudo_event_base *base, struct sudo_event *ev,
int
sudo_ev_add_v1(struct sudo_event_base *base, struct sudo_event *ev,
struct timeval *timo, bool tohead)
const struct timeval *timo, bool tohead)
{
struct timespec tsbuf, *ts = NULL;
@@ -468,7 +468,7 @@ sudo_ev_add_v1(struct sudo_event_base *base, struct sudo_event *ev,
int
sudo_ev_add_v2(struct sudo_event_base *base, struct sudo_event *ev,
struct timespec *timo, bool tohead)
const struct timespec *timo, bool tohead)
{
debug_decl(sudo_ev_add, SUDO_DEBUG_EVENT);