summaryrefslogtreecommitdiff
path: root/src/common.c
diff options
context:
space:
mode:
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;