From: Jaeyun Jung Date: Fri, 15 Sep 2023 04:55:09 +0000 (+0900) Subject: [CodeClean] validate str param X-Git-Tag: accepted/tizen/unified/20230915.160553^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2bf50d57f0f8d856ae38cf82b0a0f3746f46a08a;p=platform%2Fupstream%2Fnnstreamer-edge.git [CodeClean] validate str param Code clean, macro to check input param. Signed-off-by: Jaeyun Jung --- diff --git a/src/libnnstreamer-edge/nnstreamer-edge-aitt.c b/src/libnnstreamer-edge/nnstreamer-edge-aitt.c index 7ba4598..1e531a9 100644 --- a/src/libnnstreamer-edge/nnstreamer-edge-aitt.c +++ b/src/libnnstreamer-edge/nnstreamer-edge-aitt.c @@ -338,13 +338,13 @@ nns_edge_aitt_set_option (nns_edge_aitt_h handle, const char *key, return NNS_EDGE_ERROR_INVALID_PARAMETER; } - if (!key) { + if (!STR_IS_VALID (key)) { nns_edge_loge ("The parameter, 'key' is NULL. It should be a valid const char*"); return NNS_EDGE_ERROR_INVALID_PARAMETER; } - if (!value) { + if (!STR_IS_VALID (value)) { nns_edge_loge ("The parameter, 'value' is NULL. It should be a valid const char*"); return NNS_EDGE_ERROR_INVALID_PARAMETER; @@ -380,7 +380,7 @@ nns_edge_aitt_get_option (nns_edge_aitt_h handle, const char *key) return NULL; } - if (!key) { + if (!STR_IS_VALID (key)) { nns_edge_loge ("The parameter, 'key' is NULL. It should be a valid const char*"); return NULL; @@ -397,7 +397,6 @@ nns_edge_aitt_get_option (nns_edge_aitt_h handle, const char *key) return aitt_option_get (ah->option, aitt_opt); } - /** * @brief Create AITT handle. */