diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-02-09 10:51:13 +0100 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2013-02-09 10:51:13 +0100 |
commit | e1a4eb9c0632d60ad96c685330202593775bb716 (patch) | |
tree | c90b6c5c7092100d5eff1e81daab9df3d40679a2 /ipc.c | |
parent | f53bf346ed8a843414a339646b9362d4015bfc25 (diff) | |
download | hardware_ril_samsung-ril-e1a4eb9c0632d60ad96c685330202593775bb716.zip hardware_ril_samsung-ril-e1a4eb9c0632d60ad96c685330202593775bb716.tar.gz hardware_ril_samsung-ril-e1a4eb9c0632d60ad96c685330202593775bb716.tar.bz2 |
Change coding style: add a space after if, for and while
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'ipc.c')
-rw-r--r-- | ipc.c | 76 |
1 files changed, 38 insertions, 38 deletions
@@ -42,12 +42,12 @@ void ipc_fmt_send(const unsigned short command, const char type, unsigned char * { struct ipc_client *ipc_client; - if(ril_data.ipc_fmt_client == NULL) { + if (ril_data.ipc_fmt_client == NULL) { LOGE("ipc_fmt_client is null, aborting!"); return; } - if(ril_data.ipc_fmt_client->data == NULL) { + if (ril_data.ipc_fmt_client->data == NULL) { LOGE("ipc_fmt_client data is null, aborting!"); return; } @@ -66,12 +66,12 @@ int ipc_fmt_read_loop(struct ril_client *client) int ipc_client_fd; fd_set fds; - if(client == NULL) { + if (client == NULL) { LOGE("client is NULL, aborting!"); return -1; } - if(client->data == NULL) { + if (client->data == NULL) { LOGE("client data is NULL, aborting!"); return -1; } @@ -82,17 +82,17 @@ int ipc_fmt_read_loop(struct ril_client *client) FD_ZERO(&fds); FD_SET(ipc_client_fd, &fds); - while(1) { - if(ipc_client_fd < 0) { + while (1) { + if (ipc_client_fd < 0) { LOGE("IPC FMT client fd is negative, aborting!"); return -1; } select(FD_SETSIZE, &fds, NULL, NULL, NULL); - if(FD_ISSET(ipc_client_fd, &fds)) { + if (FD_ISSET(ipc_client_fd, &fds)) { RIL_CLIENT_LOCK(client); - if(ipc_client_recv(ipc_client, &info) < 0) { + if (ipc_client_recv(ipc_client, &info) < 0) { RIL_CLIENT_UNLOCK(client); LOGE("IPC FMT recv failed, aborting!"); return -1; @@ -101,7 +101,7 @@ int ipc_fmt_read_loop(struct ril_client *client) ipc_fmt_dispatch(&info); - if(info.data != NULL) + if (info.data != NULL) free(info.data); } } @@ -127,7 +127,7 @@ int ipc_fmt_create(struct ril_client *client) LOGD("Creating new FMT client"); ipc_client = ipc_client_new(IPC_CLIENT_TYPE_FMT); - if(ipc_client == NULL) { + if (ipc_client == NULL) { LOGE("FMT client creation failed!"); return -1; } @@ -137,7 +137,7 @@ int ipc_fmt_create(struct ril_client *client) LOGD("Setting log handler"); rc = ipc_client_set_log_handler(ipc_client, ipc_log_handler, NULL); - if(rc < 0) { + if (rc < 0) { LOGE("Setting log handler failed!"); return -1; } @@ -147,7 +147,7 @@ int ipc_fmt_create(struct ril_client *client) LOGD("Creating handlers common data"); rc = ipc_client_create_handlers_common_data(ipc_client); - if(rc < 0) { + if (rc < 0) { LOGE("Creating handlers common data failed!"); return -1; } @@ -155,7 +155,7 @@ int ipc_fmt_create(struct ril_client *client) LOGD("Starting modem bootstrap"); rc = ipc_client_bootstrap_modem(ipc_client); - if(rc < 0) { + if (rc < 0) { LOGE("Modem bootstrap failed!"); return -1; } @@ -163,7 +163,7 @@ int ipc_fmt_create(struct ril_client *client) LOGD("Client open..."); rc = ipc_client_open(ipc_client); - if(rc < 0) { + if (rc < 0) { LOGE("%s: failed to open ipc client", __FUNCTION__); return -1; } @@ -172,13 +172,13 @@ int ipc_fmt_create(struct ril_client *client) ipc_client_fd = ipc_client_get_handlers_common_data_fd(ipc_client); client_data->ipc_client_fd = ipc_client_fd; - if(ipc_client_fd < 0) { + if (ipc_client_fd < 0) { LOGE("%s: client_fmt_fd is negative, aborting", __FUNCTION__); return -1; } LOGD("Client power on..."); - if(ipc_client_power_on(ipc_client)) { + if (ipc_client_power_on(ipc_client)) { LOGE("%s: failed to power on ipc client", __FUNCTION__); return -1; } @@ -196,24 +196,24 @@ int ipc_fmt_destroy(struct ril_client *client) LOGD("Destrying ipc fmt client"); - if(client == NULL) { + if (client == NULL) { LOGE("client was already destroyed"); return 0; } - if(client->data == NULL) { + if (client->data == NULL) { LOGE("client data was already destroyed"); return 0; } ipc_client_fd = ((struct ipc_client_data *) client->data)->ipc_client_fd; - if(ipc_client_fd) + if (ipc_client_fd) close(ipc_client_fd); ipc_client = ((struct ipc_client_data *) client->data)->ipc_client; - if(ipc_client != NULL) { + if (ipc_client != NULL) { ipc_client_destroy_handlers_common_data(ipc_client); ipc_client_power_off(ipc_client); ipc_client_close(ipc_client); @@ -233,12 +233,12 @@ void ipc_rfs_send(const unsigned short command, unsigned char *data, const int l { struct ipc_client *ipc_client; - if(ril_data.ipc_rfs_client == NULL) { + if (ril_data.ipc_rfs_client == NULL) { LOGE("ipc_rfs_client is null, aborting!"); return; } - if(ril_data.ipc_rfs_client->data == NULL) { + if (ril_data.ipc_rfs_client->data == NULL) { LOGE("ipc_rfs_client data is null, aborting!"); return; } @@ -257,12 +257,12 @@ int ipc_rfs_read_loop(struct ril_client *client) int ipc_client_fd; fd_set fds; - if(client == NULL) { + if (client == NULL) { LOGE("client is NULL, aborting!"); return -1; } - if(client->data == NULL) { + if (client->data == NULL) { LOGE("client data is NULL, aborting!"); return -1; } @@ -273,17 +273,17 @@ int ipc_rfs_read_loop(struct ril_client *client) FD_ZERO(&fds); FD_SET(ipc_client_fd, &fds); - while(1) { - if(ipc_client_fd < 0) { + while (1) { + if (ipc_client_fd < 0) { LOGE("IPC RFS client fd is negative, aborting!"); return -1; } select(FD_SETSIZE, &fds, NULL, NULL, NULL); - if(FD_ISSET(ipc_client_fd, &fds)) { + if (FD_ISSET(ipc_client_fd, &fds)) { RIL_CLIENT_LOCK(client); - if(ipc_client_recv(ipc_client, &info) < 0) { + if (ipc_client_recv(ipc_client, &info) < 0) { RIL_CLIENT_UNLOCK(client); LOGE("IPC RFS recv failed, aborting!"); return -1; @@ -292,7 +292,7 @@ int ipc_rfs_read_loop(struct ril_client *client) ipc_rfs_dispatch(&info); - if(info.data != NULL) + if (info.data != NULL) free(info.data); } } @@ -318,7 +318,7 @@ int ipc_rfs_create(struct ril_client *client) LOGD("Creating new RFS client"); ipc_client = ipc_client_new(IPC_CLIENT_TYPE_RFS); - if(ipc_client == NULL) { + if (ipc_client == NULL) { LOGE("RFS client creation failed!"); return -1; } @@ -328,7 +328,7 @@ int ipc_rfs_create(struct ril_client *client) LOGD("Setting log handler"); rc = ipc_client_set_log_handler(ipc_client, ipc_log_handler, NULL); - if(rc < 0) { + if (rc < 0) { LOGE("Setting log handler failed!"); return -1; } @@ -338,7 +338,7 @@ int ipc_rfs_create(struct ril_client *client) LOGD("Creating handlers common data"); rc = ipc_client_create_handlers_common_data(ipc_client); - if(rc < 0) { + if (rc < 0) { LOGE("Creating handlers common data failed!"); return -1; } @@ -346,7 +346,7 @@ int ipc_rfs_create(struct ril_client *client) LOGD("Client open..."); rc = ipc_client_open(ipc_client); - if(rc < 0) { + if (rc < 0) { LOGE("%s: failed to open ipc client", __FUNCTION__); return -1; } @@ -355,7 +355,7 @@ int ipc_rfs_create(struct ril_client *client) ipc_client_fd = ipc_client_get_handlers_common_data_fd(ipc_client); client_data->ipc_client_fd = ipc_client_fd; - if(ipc_client_fd < 0) { + if (ipc_client_fd < 0) { LOGE("%s: client_rfs_fd is negative, aborting", __FUNCTION__); return -1; } @@ -374,24 +374,24 @@ int ipc_rfs_destroy(struct ril_client *client) LOGD("Destrying ipc rfs client"); - if(client == NULL) { + if (client == NULL) { LOGE("client was already destroyed"); return 0; } - if(client->data == NULL) { + if (client->data == NULL) { LOGE("client data was already destroyed"); return 0; } ipc_client_fd = ((struct ipc_client_data *) client->data)->ipc_client_fd; - if(ipc_client_fd) + if (ipc_client_fd) close(ipc_client_fd); ipc_client = ((struct ipc_client_data *) client->data)->ipc_client; - if(ipc_client != NULL) { + if (ipc_client != NULL) { ipc_client_destroy_handlers_common_data(ipc_client); ipc_client_close(ipc_client); ipc_client_free(ipc_client); |