Commit 91681b44 authored by jake's avatar jake Committed by Uze Choi

Fix warning from static analyzer

 - Remove unnecessary function (isdigit)
   * it is valid function when the param is char but used int param
 - Add memory free when return error.

Change-Id: I1bbecc7e88f8973340299b8393736e6fd24f1587
Signed-off-by: default avatarjake <jaehong2.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17609Reviewed-by: default avatarChihyun Cho <ch79.cho@samsung.com>
Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent 275a4152
......@@ -22,7 +22,6 @@
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include "NSProviderInterface.h"
#include "NSCommon.h"
......@@ -206,7 +205,7 @@ int main()
printf("input : ");
if(scanf("%d", &num) > 0 && isdigit(num) == 0)
if(scanf("%d", &num) > 0)
{
if(scanf("%c", &dummy) > 0)
{
......
......@@ -248,6 +248,7 @@ NSResult NSConsumerCacheWriteProvider(NSCacheList * list, NSCacheElement * newOb
if (!obj->data)
{
NS_LOG (ERROR, "Failed to CopyProvider");
NSOICFree(obj);
pthread_mutex_unlock(mutex);
return NS_ERROR;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment