summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd/rde_attr.c')
-rw-r--r--usr.sbin/bgpd/rde_attr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c
index f6e24baffdb..982f5cdac38 100644
--- a/usr.sbin/bgpd/rde_attr.c
+++ b/usr.sbin/bgpd/rde_attr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_attr.c,v 1.132 2022/12/14 12:37:15 claudio Exp $ */
+/* $OpenBSD: rde_attr.c,v 1.133 2023/06/12 12:10:17 claudio Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -85,7 +85,7 @@ attr_writebuf(struct ibuf *buf, uint8_t flags, uint8_t type, void *data,
if (ibuf_add(buf, hdr, flags & ATTR_EXTLEN ? 4 : 3) == -1)
return (-1);
- if (data && ibuf_add(buf, data, data_len) == -1)
+ if (data != NULL && ibuf_add(buf, data, data_len) == -1)
return (-1);
return (0);
}