aboutsummaryrefslogtreecommitdiff
path: root/logger.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-06-06 11:48:02 +0000
committerOmar Polo <op@omarpolo.com>2023-06-06 11:48:02 +0000
commitbc525c73db98605f5bb8d53fb640b9955997fb48 (patch)
tree515b88ba997be28f1c95ad071b8bffdd9ad8cd64 /logger.c
parenteae52ad493f582222b4f2b748c0043c42bb851cb (diff)
fix asprintf failure check
Diffstat (limited to 'logger.c')
-rw-r--r--logger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/logger.c b/logger.c
index 3f02b63..c509ddb 100644
--- a/logger.c
+++ b/logger.c
@@ -96,7 +96,7 @@ log_request(struct client *c, char *meta, size_t l)
ec = asprintf(&fmted, "%s:%s GET %s %.*s", hbuf, sbuf, b,
(int)(t-meta), meta);
- if (ec < 0)
+ if (ec == -1)
err(1, "asprintf");
imsg_compose(&logibuf, IMSG_LOG_REQUEST, 0, 0, -1, fmted, ec + 1);