{
_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
_INFO("bluetooth %d", adapter_state);
- if (adapter_state == BT_ADAPTER_ENABLED) {
+ if (adapter_state == BT_ADAPTER_ENABLED)
return __start_rfcomm(server);
- }
+
return 0;
}
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());
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;
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);
bmem = BIO_push(b64, bmem);
*outlen = BIO_read(bmem, out, inlen);
- if (*outlen <= 0)
- {
+ if (*outlen <= 0) {
if (base64) {
free(base64);
base64 = NULL;
__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");
/* 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);
}
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;
}