Commit 9227a12a by Michel Normand Committed by Daniel Lezcano

local struct name changed in mainloop.c

Two files have each their own structure definition with the same name. The types name don't conflict but in the name of sanity, let's rename these structures. not critical isn't it :) Signed-off-by: 's avatarMichel Normand <normand@fr.ibm.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent cfd1dc09
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "mainloop.h" #include "mainloop.h"
struct lxc_handler { struct mainloop_handler {
lxc_mainloop_callback_t callback; lxc_mainloop_callback_t callback;
int fd; int fd;
void *data; void *data;
...@@ -38,7 +38,7 @@ struct lxc_handler { ...@@ -38,7 +38,7 @@ struct lxc_handler {
int lxc_mainloop(struct lxc_epoll_descr *descr) int lxc_mainloop(struct lxc_epoll_descr *descr)
{ {
int i, nfds, triggered; int i, nfds, triggered;
struct lxc_handler *handler; struct mainloop_handler *handler;
for (;;) { for (;;) {
...@@ -58,7 +58,8 @@ int lxc_mainloop(struct lxc_epoll_descr *descr) ...@@ -58,7 +58,8 @@ int lxc_mainloop(struct lxc_epoll_descr *descr)
continue; continue;
triggered++; triggered++;
handler = (struct lxc_handler *)descr->ev[i].data.ptr; handler =
(struct mainloop_handler *) descr->ev[i].data.ptr;
/* If the handler returns a positive value, exit /* If the handler returns a positive value, exit
the mainloop */ the mainloop */
...@@ -79,7 +80,7 @@ int lxc_mainloop_add_handler(struct lxc_epoll_descr *descr, int fd, ...@@ -79,7 +80,7 @@ int lxc_mainloop_add_handler(struct lxc_epoll_descr *descr, int fd,
lxc_mainloop_callback_t callback, void *data) lxc_mainloop_callback_t callback, void *data)
{ {
struct epoll_event *ev; struct epoll_event *ev;
struct lxc_handler *handler; struct mainloop_handler *handler;
int ret = -1; int ret = -1;
handler = malloc(sizeof(*handler)); handler = malloc(sizeof(*handler));
...@@ -118,7 +119,7 @@ out_free: ...@@ -118,7 +119,7 @@ out_free:
int lxc_mainloop_del_handler(struct lxc_epoll_descr *descr, int fd) int lxc_mainloop_del_handler(struct lxc_epoll_descr *descr, int fd)
{ {
struct epoll_event *ev; struct epoll_event *ev;
struct lxc_handler *handler; struct mainloop_handler *handler;
int i, j, idx = 0; int i, j, idx = 0;
for (i = 0; i < descr->nfds; i++) { for (i = 0; i < descr->nfds; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment