]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: speak soothing words to scanbuild
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 15 Oct 2019 18:25:02 +0000 (18:25 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 15 Oct 2019 18:25:02 +0000 (18:25 +0000)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
bgpd/bgp_io.c

index c4555afc5296cd89a5455a103cffa288e77cab39..9e1c89b71c86b6b019ab8ef064a101f3c894ac59 100644 (file)
@@ -343,6 +343,8 @@ static uint16_t bgp_write(struct peer *peer)
 
                        total_written += msg_written;
 
+                       assert(total_written < count);
+
                        memmove(&iov, &iov[msg_written],
                                sizeof(iov[0]) * iovsz);
                        streams = &streams[msg_written];