fix svace issue 68/102968/1
authorjkjo92 <jkjo92@samsung.com>
Wed, 7 Dec 2016 02:11:57 +0000 (11:11 +0900)
committerjkjo92 <jkjo92@samsung.com>
Wed, 7 Dec 2016 02:11:57 +0000 (11:11 +0900)
Change-Id: I989d7742a268ed3c00f0e53fe5f3a4be13ef48bf

src/oauth2_request.c

index 4d5f849..d2d5803 100644 (file)
@@ -51,10 +51,6 @@ oauth2_request_destroy(oauth2_request_h handle)
                "NULL handle");
 
        oauth2_request_s *req_impl = (oauth2_request_s *) handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("NULL handle");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (req_impl->request_data)
                bundle_free(req_impl->request_data);
@@ -72,10 +68,6 @@ oauth2_request_set_auth_end_point_url(oauth2_request_h handle, const char *url)
                "NULL handle");
 
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");
@@ -93,10 +85,6 @@ oauth2_request_set_token_end_point_url(oauth2_request_h handle, const char *url)
                "NULL handle");
 
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");
@@ -114,10 +102,6 @@ oauth2_request_set_redirection_url(oauth2_request_h handle, const char *url)
                "NULL handle");
 
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");
@@ -135,10 +119,6 @@ oauth2_request_set_refresh_token_url(oauth2_request_h handle, const char *url)
                "NULL handle");
 
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");
@@ -155,10 +135,6 @@ oauth2_request_set_refresh_token(oauth2_request_h handle, char *refresh_token)
        OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
                "NULL handle");
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");
@@ -183,10 +159,6 @@ oauth2_request_set_response_type(oauth2_request_h handle,
        }
 
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");
@@ -206,10 +178,6 @@ oauth2_request_set_client_id(oauth2_request_h handle, const char *client_id)
                "NULL handle");
 
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");
@@ -228,10 +196,6 @@ oauth2_request_set_client_secret(oauth2_request_h handle,
                "NULL handle");
 
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");
@@ -256,10 +220,6 @@ oauth2_request_set_client_authentication_type(oauth2_request_h handle,
        }
 
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");
@@ -279,10 +239,6 @@ oauth2_request_set_scope(oauth2_request_h handle, const char *scope)
                "NULL handle");
 
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");
@@ -300,10 +256,6 @@ oauth2_request_set_state(oauth2_request_h handle, const char *state)
                "NULL handle");
 
        oauth2_request_s *req_impl = (oauth2_request_s *)handle;
-       if (!req_impl) {
-               OAUTH2_LOG_E("Null Input");
-               return OAUTH2_ERROR_INVALID_PARAMETER;
-       }
 
        if (!req_impl->request_data) {
                OAUTH2_LOG_E("oauth2_request_h must be created first.");