]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nest: Fix signedness of large communities
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 4 Oct 2016 10:45:39 +0000 (12:45 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 4 Oct 2016 10:45:39 +0000 (12:45 +0200)
nest/a-set.c

index 0484ab9865b36202bce0305817255cb7bd846eca..fde34cabc1bf3eaf409665a755a2df0d430621f4 100644 (file)
@@ -144,7 +144,7 @@ ec_set_format(struct adata *set, int from, byte *buf, uint size)
 int
 lc_format(byte *buf, lcomm lc)
 {
-  return bsprintf(buf, "(%d, %d, %d)", lc.asn, lc.ldp1, lc.ldp2);
+  return bsprintf(buf, "(%u, %u, %u)", lc.asn, lc.ldp1, lc.ldp2);
 }
 
 int
@@ -167,7 +167,7 @@ lc_set_format(struct adata *set, int from, byte *buf, uint bufsize)
          return i;
        }
 
-      buf += bsprintf(buf, "(%d, %d, %d)", d[i], d[i+1], d[i+2]);
+      buf += bsprintf(buf, "(%u, %u, %u)", d[i], d[i+1], d[i+2]);
       *buf++ = ' ';
     }