diff options
Diffstat (limited to 'src/binlog.c')
-rw-r--r-- | src/binlog.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/binlog.c b/src/binlog.c index 7e88817..765b945 100644 --- a/src/binlog.c +++ b/src/binlog.c @@ -220,9 +220,11 @@ vmod_init(struct sess *sp, struct vmod_priv *priv, AN(conf->dir); conf->inst_head = packcomp(dataspec, &p); - AN(conf->inst_head); - if (*p) { - binlog_error("cannot compile data format near %s", p); + if (!conf->inst_head) { + if (errno == EINVAL) + binlog_error("cannot compile data format near %s", p); + else + binlog_error("%s", strerror(errno)); abort(); } conf->recsize = packsize(conf->inst_head); |