summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_attr.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2023-06-12 12:10:18 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2023-06-12 12:10:18 +0000
commitbc36221825eb9674ced814dfaeacccaa99d8e453 (patch)
tree7a62f6251dab414cf44ff723d77b7c10fee29e9c /usr.sbin/bgpd/rde_attr.c
parentb5272be9891c359192bdf446b2ec54605338b079 (diff)
Use data != NULL to be more explicit. No functional change.
OK tb@
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);
}