]> granicus.if.org Git - libevent/commitdiff
constify structs; from Andrei Nigmatulin
authorNiels Provos <provos@gmail.com>
Sat, 13 Dec 2008 06:11:12 +0000 (06:11 +0000)
committerNiels Provos <provos@gmail.com>
Sat, 13 Dec 2008 06:11:12 +0000 (06:11 +0000)
svn:r959

devpoll.c
epoll.c
event.c

index 2fbb03ca84012ff11ca094cf74483907d5c4bcdd..8cc3b757892516231569468f1f042f9a35b9c290 100644 (file)
--- a/devpoll.c
+++ b/devpoll.c
@@ -76,7 +76,7 @@ static int devpoll_del        (void *, struct event *);
 static int devpoll_dispatch    (struct event_base *, void *, struct timeval *);
 static void devpoll_dealloc    (struct event_base *, void *);
 
-struct eventop devpollops = {
+const struct eventop devpollops = {
        "devpoll",
        devpoll_init,
        devpoll_add,
diff --git a/epoll.c b/epoll.c
index d5a75dc23044fa744a418944da8619bd42570094..3630a0dbedc95f714f5863a1eb5397c55fe90c4e 100644 (file)
--- a/epoll.c
+++ b/epoll.c
@@ -76,7 +76,7 @@ static int epoll_del  (void *, struct event *);
 static int epoll_dispatch      (struct event_base *, void *, struct timeval *);
 static void epoll_dealloc      (struct event_base *, void *);
 
-struct eventop epollops = {
+const struct eventop epollops = {
        "epoll",
        epoll_init,
        epoll_add,
diff --git a/event.c b/event.c
index a2566368efcc9c68569b773f6548ca2631f65fce..f41c268754c60380a7b74653477c59072f324675 100644 (file)
--- a/event.c
+++ b/event.c
@@ -90,7 +90,7 @@ extern const struct eventop win32ops;
 #endif
 
 /* In order of preference */
-const struct eventop *eventops[] = {
+static const struct eventop *eventops[] = {
 #ifdef HAVE_EVENT_PORTS
        &evportops,
 #endif