]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: use the right format specifier
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 19 Mar 2020 13:00:20 +0000 (14:00 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 19 Mar 2020 13:00:20 +0000 (14:00 +0100)
Fixes:
/Library/Developer/CommandLineTools/usr/bin/make  all-am
  CC       bgpd/bgp_attr.o
bgpd/bgp_attr.c:2664:5: warning: format specifies type 'unsigned char' but the argument has type 'uint16_t' (aka 'unsigned short') [-Wformat]
                                length, STREAM_READABLE(peer->curr));
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./lib/log.h:94:50: note: expanded from macro 'flog_err'
        zlog_err("[EC %" PRIu32 "] " format, ferr_id, ##__VA_ARGS__)
                                     ~~~~~~             ^~~~~~~~~~~
1 warning generated.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
bgpd/bgp_attr.c

index 7c15fd37118d0bbf20d2430431e23b8828952f9d..9afd3780e0bf7a0a625fc0ab4f0849ab00261318 100644 (file)
@@ -2659,7 +2659,7 @@ bgp_attr_parse_ret_t bgp_attr_prefix_sid(struct bgp_attr_parser_args *args,
                if (STREAM_READABLE(peer->curr) < length) {
                        flog_err(
                                EC_BGP_ATTR_LEN,
-                               "Malformed Prefix SID attribute - insufficient data (need %" PRIu8
+                               "Malformed Prefix SID attribute - insufficient data (need %" PRIu16
                                " for attribute body, have %zu remaining in UPDATE)",
                                length, STREAM_READABLE(peer->curr));
                        return bgp_attr_malformed(args,