New Defects reported by Coverity Scan for freerangerouting/frr
Hi, Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan. 2 new defect(s) introduced to freerangerouting/frr found with Coverity Scan. 8 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 2 of 2 defect(s) ** CID 1445724: Incorrect expression (NO_EFFECT) /lib/termtable.c: 133 in ttable_insert_row_va() ________________________________________________________________________________________________________ *** CID 1445724: Incorrect expression (NO_EFFECT) /lib/termtable.c: 133 in ttable_insert_row_va() 127 struct ttable_cell *row; 128 int col = 0; 129 int ncols = 0; 130 131 /* count how many columns we have */ 132 f = format;
CID 1445724: Incorrect expression (NO_EFFECT) The dereference in "*f++" has no effect.
133 for (; f[ncols]; f[ncols] == '|' ? ncols++ : *f++) 134 ; 135 ncols++; 136 137 if (tt->ncols == 0) 138 tt->ncols = ncols;
** CID 1445723: Incorrect expression (IDENTICAL_BRANCHES) /lib/termtable.c: 341 in ttable_dump() ________________________________________________________________________________________________________ *** CID 1445723: Incorrect expression (IDENTICAL_BRANCHES) /lib/termtable.c: 341 in ttable_dump() 335 for (int i = 0; i < tt->ncols; i++) 336 width += cw[i]; 337 338 /* calculate number of lines en total */ 339 nlines = tt->nrows; 340 nlines += tt->style.border.top_on ? 1 : 0;
CID 1445723: Incorrect expression (IDENTICAL_BRANCHES) Ternary expression on condition "tt->style.border.bottom_on" has identical then and else expressions: "1". Should one of the expressions be modified, or the entire ternary expression replaced?
341 nlines += tt->style.border.bottom_on ? 1 : 1; // makes life easier 342 for (int i = 0; i < tt->nrows; i++) { 343 /* if leftmost cell has top / bottom border, whole row does */ 344 nlines += tt->table[i][0].style.border.top_on ? 1 : 0; 345 nlines += tt->table[i][0].style.border.bottom_on ? 1 : 0; 346 }
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05... To manage Coverity Scan email notifications for "frr@lists.nox.tf", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05...
participants (1)
-
scan-admin@coverity.com