aboutsummaryrefslogtreecommitdiff
path: root/src/common.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-07-15 23:28:00 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-07-16 00:57:55 +0200
commit996e0912c26caeb08b8f3874c82177ec81aa14b3 (patch)
treed33e9a9b0443c76b5169d622a0fdc9bf803847df /src/common.c
parentc4199467296eb21488258f29f7029891d918b585 (diff)
downloadxK-996e0912c26caeb08b8f3874c82177ec81aa14b3.tar.gz
xK-996e0912c26caeb08b8f3874c82177ec81aa14b3.tar.xz
xK-996e0912c26caeb08b8f3874c82177ec81aa14b3.zip
First bugfixes
Now we can at least successfully register.
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c7
1 files changed, 5 insertions, 2 deletions
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;