fix coding rule error & warning 62/149062/1 accepted/tizen/unified/20170918.152808 submit/tizen/20170914.095756
authorjkjo92 <jkjo92@samsung.com>
Mon, 11 Sep 2017 10:58:53 +0000 (19:58 +0900)
committerjkjo92 <jkjo92@samsung.com>
Mon, 11 Sep 2017 10:58:53 +0000 (19:58 +0900)
Change-Id: I54f4d9ff3a636245d10204603401e2bfe73d4c05
Signed-off-by: jkjo92 <jkjo92@samsung.com>
bt_roaming_agent/src/bt_server.c
test/RADemoTV/src/fido_handler.c [changed mode: 0644->0755]
test/RADemoTV/src/rademotv.c [changed mode: 0644->0755]

index d94e877..55b41a3 100755 (executable)
@@ -462,9 +462,8 @@ adapter_state_changed_cb(int result, bt_adapter_state_e adapter_state, void* use
 {
        _INFO("bluetooth %d", result);
        _INFO("bluetooth %d", adapter_state);
-       if (adapter_state == BT_ADAPTER_ENABLED) {
+       if (adapter_state == BT_ADAPTER_ENABLED)
                __start_rfcomm(user_data);
-       }
 }
 
 int
@@ -490,9 +489,9 @@ bt_server_start(void)
 
        _INFO("bluetooth %d", adapter_state);
 
-       if (adapter_state == BT_ADAPTER_ENABLED) {
+       if (adapter_state == BT_ADAPTER_ENABLED)
                return __start_rfcomm(server);
-       }
+
        return 0;
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 27effca..5f5ab13
@@ -194,9 +194,9 @@ genB64Encode(const unsigned char *input, int inlen, unsigned char * output, int
        BIO * b64 = NULL;
        BUF_MEM * bptr = NULL;
        b64 = BIO_new(BIO_f_base64());
-       if (b64 == NULL)        {
+       if (b64 == NULL)
                return -1;
-       }
+
        BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
 
        bmem = BIO_new(BIO_s_mem());
@@ -208,18 +208,15 @@ genB64Encode(const unsigned char *input, int inlen, unsigned char * output, int
        memcpy(output, bptr->data, bptr->length);
        output[bptr->length] = 0;
        *outlen = bptr->length;
-       if(b64) {
+       if (b64)
                BIO_free_all(b64);
-       }
 
-       for(int i =0; i < *outlen ; i++) {
-               if(output[i] == '+') {
+       for (int i = 0; i < *outlen ; i++) {
+               if (output[i] == '+') {
                        output[i] = '-';
-               }
-               else if(output[i] == '/') {
+               } else if (output[i] == '/') {
                        output[i] = '_';
-               }
-               else if(output[i] == '=') {
+               } else if (output[i] == '=') {
                        *outlen = i ;
                        output[i] = '\0';
                        break;
@@ -258,9 +255,8 @@ __b64url_decode(const unsigned char* in, int inlen,
 
        int npadChars = (inlen % 4) == 0 ? 0 : (4 - (inlen % 4));
        unsigned char* base64 = (unsigned char*) malloc(inlen + npadChars);
-       if (base64 == NULL) {
+       if (base64 == NULL)
                return -1;
-       }
 
        memcpy(base64, in, inlen);
 
@@ -299,8 +295,7 @@ __b64url_decode(const unsigned char* in, int inlen,
 
        bmem = BIO_push(b64, bmem);
        *outlen = BIO_read(bmem, out, inlen);
-       if (*outlen <= 0)
-       {
+       if (*outlen <= 0) {
                if (base64) {
                        free(base64);
                        base64 = NULL;
old mode 100644 (file)
new mode 100755 (executable)
index c3bb27a..a5857a7
@@ -100,9 +100,9 @@ static char *
 __get_error_str(fido_error_e error_code)
 {
 
-       char *error_str = calloc(1,128);
+       char *error_str = calloc(1, 128);
 
-       if(error_code == FIDO_ERROR_NONE)
+       if (error_code == FIDO_ERROR_NONE)
                strcpy(error_str, "SUCCESS");
        else if (error_code == FIDO_ERROR_OUT_OF_MEMORY)
                strcpy(error_str, "FIDO_ERROR_OUT_OF_MEMORY");
@@ -367,11 +367,11 @@ create_list_view(appdata_s *ad)
        /* This button is set for devices which doesn't have H/W back key. */
        btn = elm_button_add(nf);
        elm_object_style_set(btn, "naviframe/end_btn/default");
-       if (ad->stored_data == NULL) {
+       if (ad->stored_data == NULL)
                nf_it = elm_naviframe_item_push(nf, "No Previous Registration", btn, NULL, ad->list, NULL);
-       } else {
+       else
                nf_it = elm_naviframe_item_push(nf, ad->stored_data->uname, btn, NULL, ad->list, NULL);
-       }
+
        elm_naviframe_item_pop_cb_set(nf_it, naviframe_pop_cb, ad->win);
 }
 
@@ -523,9 +523,8 @@ main(int argc, char *argv[])
        ui_app_remove_event_handler(handlers[APP_EVENT_LOW_MEMORY]);
 
        ret = ui_app_main(argc, argv, &event_callback, &ad);
-       if (ret != APP_ERROR_NONE) {
+       if (ret != APP_ERROR_NONE)
                dlog_print(DLOG_ERROR, LOG_TAG, "app_main() is failed. err = %d", ret);
-       }
 
        return ret;
 }