[dev] New Defects reported by Coverity Scan for freerangerouting/frr
scan-admin at coverity.com
scan-admin at coverity.com
Fri Jun 16 13:04:24 EDT 2017
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-2BfV0V05UPxvVjWch-2Bd2MGckcRa7dJ8klHLUFWVd2fqpS-2B-2FHaN43B-2FQ11ntcKmbKat2WeHs8691VOJpZofPkpp-2BRBqc-3D_d-2Fi2nRutHp-2FDWtw8JRg-2Bc1m9CS4-2B5uVbodfDyLsp-2FJn94c4V3vHvVbHZgzypNP-2FC8-2FGv8p4rwjG40drjNnWh2vgNdKg9zkQ8uCsvLhbz7SSNngb59XIRPqqQyPF2ZAOaBZxaCb1Eo1s5LIRtJqPsUavyiFD66dDkSpWX8vJo8hG15EEUwWzoj3PlblhFOi-2BjBgW398GEdShNbMx9p84AmA-3D-3D
To manage Coverity Scan email notifications for "frr at lists.nox.tf", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4lcTWm1Zma8LQDNpOYqrETKrqBiM18kcBcL8b08LzBPOYJYGySZ4Vv7d5QYcnSbGxl3QyORKgEmDxh-2BE2mj6dp1V4JSs2jbMZuLnEQJOW0Z0-3D_d-2Fi2nRutHp-2FDWtw8JRg-2Bc1m9CS4-2B5uVbodfDyLsp-2FJn94c4V3vHvVbHZgzypNP-2FCATYhKpzaSF8OSFXnr-2Bw4bErfCaZgbsv07-2F4sMRY7df9A7gje716PyUhnNdul8FVHeBrP87cjFNDdY0-2BXKJOVLw3X2PSaRhhNf6nWJbORyVTPvHJJhcRdRdAb712Qpb0NgHcg4fWuQoiW9BcEQ-2FyE9g-3D-3D
More information about the dev
mailing list