summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_event_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/dlt_daemon_event_handler.c')
-rw-r--r--src/daemon/dlt_daemon_event_handler.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/daemon/dlt_daemon_event_handler.c b/src/daemon/dlt_daemon_event_handler.c
index 3cecf64..0d463da 100644
--- a/src/daemon/dlt_daemon_event_handler.c
+++ b/src/daemon/dlt_daemon_event_handler.c
@@ -109,9 +109,9 @@ int dlt_daemon_prepare_event_handling(DltEventHandler *ev)
static void dlt_event_handler_enable_fd(DltEventHandler *ev, int fd, int mask)
{
if (ev->max_nfds <= ev->nfds) {
- int i = (int) ev->nfds;
- int max = (int) (2 * ev->max_nfds);
- struct pollfd *tmp = realloc(ev->pfd, (size_t) (max) * sizeof(*ev->pfd));
+ int i = ev->nfds;
+ int max = 2 * ev->max_nfds;
+ struct pollfd *tmp = realloc(ev->pfd, max * sizeof(*ev->pfd));
if (!tmp) {
dlt_log(LOG_CRIT,
@@ -143,7 +143,7 @@ static void dlt_event_handler_disable_fd(DltEventHandler *ev, int fd)
{
unsigned int i = 0;
unsigned int j = 0;
- unsigned int nfds = (unsigned int) ev->nfds;
+ unsigned int nfds = ev->nfds;
for (; i < nfds; i++, j++) {
if (ev->pfd[i].fd == fd) {