From 996e0912c26caeb08b8f3874c82177ec81aa14b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Tue, 15 Jul 2014 23:28:00 +0200
Subject: First bugfixes
Now we can at least successfully register.
---
src/common.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'src/common.c')
diff --git a/src/common.c b/src/common.c
index e20c79d..fecaa92 100644
--- a/src/common.c
+++ b/src/common.c
@@ -519,7 +519,7 @@ error_set (struct error **e, const char *message, ...)
va_list ap;
va_start (ap, message);
- int size = snprintf (NULL, 0, message, ap);
+ int size = vsnprintf (NULL, 0, message, ap);
va_end (ap);
hard_assert (size >= 0);
@@ -528,7 +528,7 @@ error_set (struct error **e, const char *message, ...)
tmp->message = xmalloc (size + 1);
va_start (ap, message);
- size = snprintf (tmp->message, size + 1, message, ap);
+ size = vsnprintf (tmp->message, size + 1, message, ap);
va_end (ap);
hard_assert (size >= 0);
@@ -579,6 +579,8 @@ struct str_map
void (*free) (void *); ///< Callback to destruct the payload
/// Callback to compare keys for equivalence
+ // FIXME: they may still end up on a different index, and actually should;
+ // delete this callback and put strxfrm() in its place
int (*key_cmp) (const char *, const char *);
};
@@ -1088,6 +1090,7 @@ poller_set (struct poller *self, int fd, short int events,
struct poller_info *info = self->info[index];
info->fd = fd;
+ info->events = events;
info->dispatcher = dispatcher;
info->user_data = data;
--
cgit v1.2.3