From: Ravi Nanjundappa Date: Fri, 3 Jul 2015 11:11:27 +0000 (+0530) Subject: things-manager: Fix cppcheck issues in TMSampleApp for tizen X-Git-Tag: 1.2.0+RC1~1498 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2784539a6a1ce58ef4ec828f8a344fb7ee1ac40a;p=platform%2Fupstream%2Fiotivity.git things-manager: Fix cppcheck issues in TMSampleApp for tizen This patch fixes the below issues reported by cppcheck tool in TMSampleApp dir for tizen. "(error) Possible null pointer dereference: popup_fields ...." It is invliad to set the member of popup_field to NULL if popup_field itself is NULL. Removed such statements from the code. Change-Id: Ie1457662cb2727e5bab5e21886db6bece2f356a7 Signed-off-by: Ravi Nanjundappa Reviewed-on: https://gerrit.iotivity.org/gerrit/1511 Tested-by: jenkins-iotivity Reviewed-by: Harish Marappa Reviewed-by: Uze Choi --- diff --git a/service/things-manager/sampleapp/tizen/TMSampleApp/src/configuration.cpp b/service/things-manager/sampleapp/tizen/TMSampleApp/src/configuration.cpp index 4d09f54..ee434ed 100644 --- a/service/things-manager/sampleapp/tizen/TMSampleApp/src/configuration.cpp +++ b/service/things-manager/sampleapp/tizen/TMSampleApp/src/configuration.cpp @@ -780,8 +780,6 @@ list_update_region_cb(void *data, Evas_Object *obj, void *event_info) if (NULL == popup_fields) { dlog_print(DLOG_INFO, LOG_TAG, "#### Memory allocation failed"); - popup_fields->popup = NULL; - popup_fields->entry = NULL; } else { diff --git a/service/things-manager/sampleapp/tizen/TMSampleApp/src/group.cpp b/service/things-manager/sampleapp/tizen/TMSampleApp/src/group.cpp index d2a70ee..5bce243 100644 --- a/service/things-manager/sampleapp/tizen/TMSampleApp/src/group.cpp +++ b/service/things-manager/sampleapp/tizen/TMSampleApp/src/group.cpp @@ -954,8 +954,6 @@ list_scheduled_actionset_cb(void *data, Evas_Object *obj, void *event_info) if (NULL == popup_fields) { dlog_print(DLOG_INFO, LOG_TAG, "#### Memory allocation failed"); - popup_fields->popup = NULL; - popup_fields->entry = NULL; } else {