d2d-conv-manager: fix svace_2.2 issues 83/100983/1 accepted/tizen/common/20161130.070753 accepted/tizen/mobile/20161130.232222 accepted/tizen/tv/20161130.232239 accepted/tizen/wearable/20161130.232258 submit/tizen/20161130.051047
authorHongkuk, Son <hongkuk.son@samsung.com>
Tue, 29 Nov 2016 06:30:39 +0000 (15:30 +0900)
committerHongkuk Son <hongkuk.son@samsung.com>
Wed, 30 Nov 2016 04:54:18 +0000 (20:54 -0800)
Signed-off-by: Hongkuk, Son <hongkuk.son@samsung.com>
Change-Id: I219e4d924ebf4b7a5e375f930d98787f324b1771

daemon/service_provider/AppCommServiceProvider.cpp
daemon/service_provider/RemoteAppControlServiceProvider.cpp [changed mode: 0644->0755]
msf_tizen_client/src/Channel.cpp

index c59319b..f2c85b2 100755 (executable)
@@ -110,11 +110,6 @@ int conv::AppCommServiceProvider::loadServiceInfo(Request* requestObj)
                if ( svcInfoBase != NULL ) {
                        _D("local service instance already exists");
                        svcInfo = reinterpret_cast<AppCommServiceInfo*>(svcInfoBase);
-
-                       if (svcInfo == NULL) {
-                               _D("casting failed");
-                               return CONV_ERROR_INVALID_OPERATION;
-                       }
                } else {
                        _D("allocating new service instance for local service");
                        svcInfo = new(std::nothrow) AppCommServiceInfo();
@@ -131,11 +126,6 @@ int conv::AppCommServiceProvider::loadServiceInfo(Request* requestObj)
                if ( svcInfoBase != NULL ) {
                        _D("service instance already exists");
                        svcInfo = reinterpret_cast<AppCommServiceInfo*>(svcInfoBase);
-
-                       if (svcInfo == NULL) {
-                               _D("casting failed");
-                               return CONV_ERROR_INVALID_OPERATION;
-                       }
                } else {
                        _D("allocating new service instance");
                        svcInfo = new(std::nothrow) AppCommServiceInfo();
old mode 100644 (file)
new mode 100755 (executable)
index b27c294..5176684
@@ -981,12 +981,6 @@ int conv::RemoteAppControlServiceProvider::loadServiceInfo(Request* requestObj)
        if (svcInfoBase != NULL) {
                _D("service instance already exists");
                svcInfo = reinterpret_cast<RemoteAppControlServiceInfo*>(svcInfoBase);
-
-               if (svcInfo == NULL)
-               {
-                       _D("casting failed");
-                       return CONV_ERROR_INVALID_OPERATION;
-               }
        } else {
                _D("allocating new service instance");
                svcInfo = new(std::nothrow) RemoteAppControlServiceInfo();
index 24de9ea..b799ffc 100755 (executable)
@@ -1065,13 +1065,10 @@ void Channel::publishMessage(string method, string event, const char *data,
                handleError(string(), Error::create("Not Connected"));
                return;
        } else {
-               if (write_buf_index == 999 && write_buf_count != 999) {
+               if (write_buf_index == 999) {
                        write_buf_index = 0;
                }
 
-               if (write_buf_count == 999) {
-               }
-
                write_buf_index++;
                write_buf_count++;
 
@@ -1169,13 +1166,10 @@ void Channel::start_app(char *data, int buflength, string msgID) {
        l += snprintf((char *)&prepare_buf[LWS_SEND_BUFFER_PRE_PADDING],
                        prepare_buf_size - LWS_SEND_BUFFER_PRE_PADDING, "%s", data);
 
-       if (write_buf_index == 999 && write_buf_count != 999) {
+       if (write_buf_index == 999) {
                write_buf_index = 0;
        }
 
-       if (write_buf_count == 999) {
-       }
-
        write_buf_index++;
        write_buf_count++;