On Tuesday 24 February 2015 01:51 PM, Bala wrote:
On Tuesday 24 February 2015 01:44 PM, Maxim Uvarov wrote:
On 02/23/2015 07:10 AM, [email protected] wrote:
From: Balasubramanian Manoharan <[email protected]>
Fixes uninitialized scalar variable qos_tbl in
configure_cos_with_l2_priority()
function reported by Coverity.
https://bugs.linaro.org/show_bug.cgi?id=1143
Signed-off-by: Balasubramanian Manoharan <[email protected]>
---
test/validation/classification/odp_classification_tests.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/test/validation/classification/odp_classification_tests.c
b/test/validation/classification/odp_classification_tests.c
index 564455c..4807584 100644
--- a/test/validation/classification/odp_classification_tests.c
+++ b/test/validation/classification/odp_classification_tests.c
@@ -555,6 +555,10 @@ void configure_cos_with_l2_priority(void)
int i;
odp_queue_param_t qparam;
+ /** Initialize scalar variable qos_tbl **/
+ for (i = 0; i < CLS_L2_QOS_MAX; i++)
+ qos_tbl[i] = 0;
+
qparam.sched.sync = ODP_SCHED_SYNC_NONE;
qparam.sched.group = ODP_SCHED_GROUP_ALL;
for (i = 0; i < num_qos; i++) {
Bala, one small note. In first case "for .. CLS_L2_QOS_MAX", in
second case "for num_qos", which has the same value.
Just to be consistent can you remove num_qos variable from that
function? It's not needed.
Maxim.
Makes sense but since this is just sunnyday validation we have
executed the API with just one value for "num_qos" but as part of
enhancement to validation suite this API needs to be called with
different values of "num_qos". So I think it is better to keep num_qos
variable.
Bala
Maxim,
I still have the above described concern for this comment.
Regards,
Bala
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp