summaryrefslogtreecommitdiffstats
path: root/lib/prefix.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2021-07-06 15:47:41 +0200
committerGitHub <noreply@github.com>2021-07-06 15:47:41 +0200
commitacb4c44ef8da8c1a155184a809647533237adca9 (patch)
tree66c81b756c79ff507088d82ccc2bea4614b3a300 /lib/prefix.c
parentMerge pull request #8972 from ton31337/fix/bgp_extended_msg_support (diff)
parent*: Do not check for XMALLOC/XCALLOC against NULLs (diff)
downloadfrr-acb4c44ef8da8c1a155184a809647533237adca9.tar.xz
frr-acb4c44ef8da8c1a155184a809647533237adca9.zip
Merge pull request #8942 from ton31337/fix/cleanups_2
Another round of cleanup
Diffstat (limited to 'lib/prefix.c')
-rw-r--r--lib/prefix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/prefix.c b/lib/prefix.c
index 1c57715e8..ef7d2e59d 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -1034,7 +1034,8 @@ const char *prefix2str(union prefixconstptr pu, char *str, int size)
l = strlen(buf);
buf[l++] = '/';
byte = p->prefixlen;
- if ((tmp = p->prefixlen - 100) >= 0) {
+ tmp = p->prefixlen - 100;
+ if (tmp >= 0) {
buf[l++] = '1';
z = true;
byte = tmp;