d2d-conv-manager: fix svace_2.2 issues 50/100750/2
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 02:14:49 +0000 (11:14 +0900)
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 c59319ba7e472f0ffd2d30cfb25cf56e5edecbce..f2c85b27950c399bfc43826caae96428f4aa6d92 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 2669a2a07573249b57f04714fa9b6368f2db5882..f1cd63632e9dd08fef1106a9d81299543b3ad05c 100755 (executable)
@@ -1063,13 +1063,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++;
 
@@ -1167,13 +1164,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++;