diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2024-08-26 10:23:12 +0200 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2024-08-26 10:29:12 +0200 |
| commit | a152692f5ac207b5f55104b18ddc3146089db474 (patch) | |
| tree | 87f14bfc21b0e257723e825f07229f565b4d4a42 /bgpd/bgp_updgrp_packet.c | |
| parent | f85dfb3f1a66c4e6085162451583e764e2c41a25 (diff) | |
bgpd: fix labels static-analyser
Fix static-analyser warnings with BGP labels:
> $ scan-build make -j12
> bgpd/bgp_updgrp_packet.c:819:10: warning: Access to field 'extra' results in a dereference of a null pointer (loaded from variable 'path') [core.NullDereference]
> ? &path->extra->labels->label[0]
> ^~~~~~~~~
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'bgpd/bgp_updgrp_packet.c')
| -rw-r--r-- | bgpd/bgp_updgrp_packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index 8cd851b9ac..bed00a6640 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -813,7 +813,7 @@ struct bpacket *subgroup_update_packet(struct update_subgroup *subgrp) label_pnt = &label; num_labels = 1; } else { - num_labels = bgp_path_info_num_labels(path); + num_labels = BGP_PATH_INFO_NUM_LABELS(path); label_pnt = num_labels ? &path->extra->labels->label[0] |
