clang provides a notice about it that this p++ is useless,
because ++ would be done after the return.
From code review, I understand that p shall be incremented
for each token that is parsed from the buf. So let's keep
this intent.
Note that this commit is changing the behaviour of the source
code since from now p++ will be returned instead of p.
However, it does not hurt since the only consumer
just free() the aspath if it is parsed as as_token_unknown.
Let's be safe with a proper execution flow from now.
PS:
C reminders:
int f7(void) {
int j = 7;
return ++j; // return 8
}
int f8(void) {
int j = 7;
return j++; // return 7
}
Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
FRRouting is free software that manages various IPv4 and IPv6 routing
protocols.
Currently FRRouting supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1,
RIPv2, RIPng, PIM-SM/MSDP and LDP as well as very early support for IS-IS,
EIGRP and NHRP.
See the file REPORTING-BUGS to report bugs.
Free RRRouting is free software. See the file COPYING for copying conditions.
Public email discussion can be found at https://lists.frrouting.org/listinfo
Our public slack channel is at https://frrouting.slack.com