Use EVBUFFER_DATA instead of reaching into struct evbuffer. ok tb
authornicm <nicm@openbsd.org>
Sun, 3 Sep 2023 10:22:03 +0000 (10:22 +0000)
committernicm <nicm@openbsd.org>
Sun, 3 Sep 2023 10:22:03 +0000 (10:22 +0000)
usr.sbin/relayd/relay.c

index 3341baa..80d2741 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: relay.c,v 1.256 2023/06/06 15:16:52 beck Exp $        */
+/*     $OpenBSD: relay.c,v 1.257 2023/09/03 10:22:03 nicm Exp $        */
 
 /*
  * Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -2629,7 +2629,7 @@ relay_bufferevent_write_chunk(struct ctl_relay_event *cre,
     struct evbuffer *buf, size_t size)
 {
        int ret;
-       ret = relay_bufferevent_write(cre, buf->buffer, size);
+       ret = relay_bufferevent_write(cre, EVBUFFER_DATA(buf), size);
        if (ret != -1)
                evbuffer_drain(buf, size);
        return (ret);