diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-07-03 16:11:21 +0200 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2013-07-03 16:11:21 +0200 |
commit | 58bedbda65a060d7cdce1b09037df34a9273f5de (patch) | |
tree | 66ab4062a074862cdf01e146f17085a677911b58 | |
parent | 10eb92cac26b29c204f3a66fde2f355a692efce8 (diff) | |
download | external_libsamsung-ipc-58bedbda65a060d7cdce1b09037df34a9273f5de.zip external_libsamsung-ipc-58bedbda65a060d7cdce1b09037df34a9273f5de.tar.gz external_libsamsung-ipc-58bedbda65a060d7cdce1b09037df34a9273f5de.tar.bz2 |
xmm6160: Minor coding-style-related changes
Change-Id: I38ad147a9bef00fea50ad1259bbc7d1f1e1980f8
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r-- | samsung-ipc/device/xmm6160/xmm6160.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/samsung-ipc/device/xmm6160/xmm6160.c b/samsung-ipc/device/xmm6160/xmm6160.c index cf52f17..8715b59 100644 --- a/samsung-ipc/device/xmm6160/xmm6160.c +++ b/samsung-ipc/device/xmm6160/xmm6160.c @@ -61,7 +61,7 @@ int xmm6160_psi_send(struct ipc_client *client, int serial_fd, tcsetattr(serial_fd, TCSANOW, &termios); length = strlen(at); - for (i=0; i < XMM6160_AT_COUNT; i++) { + for (i = 0; i < XMM6160_AT_COUNT; i++) { rc = write(serial_fd, at, length); if (rc < length) { ipc_client_log(client, "Writing AT in ASCII failed"); @@ -121,7 +121,7 @@ int xmm6160_psi_send(struct ipc_client *client, int serial_fd, p = (unsigned char *) psi_data; psi_crc = 0; - for (i=0; i < psi_size; i++) { + for (i = 0; i < psi_size; i++) { rc = select(serial_fd + 1, NULL, &fds, NULL, &timeout); if (rc <= 0) { ipc_client_log(client, "Writing PSI failed"); @@ -230,10 +230,10 @@ int xmm6160_nv_data_send(struct ipc_client *client, int device_fd, void *device_address) { void *nv_data = NULL; + int nv_size; int wc; unsigned char *p; - int length; int rc; if (client == NULL || (device_fd < 0 && device_address == NULL)) @@ -261,14 +261,14 @@ int xmm6160_nv_data_send(struct ipc_client *client, int device_fd, ipc_client_log(client, "Read nv_data"); p = (unsigned char *) nv_data; - length = nv_data_size(client); + nv_size = nv_data_size(client); if (device_address != NULL) { - memcpy(device_address, p, length); + memcpy(device_address, p, nv_size); } else { wc = 0; - while (wc < length) { - rc = write(device_fd, p, length - wc); + while (wc < nv_size) { + rc = write(device_fd, p, nv_size - wc); if (rc < 0) { ipc_client_log(client, "Writing modem image failed"); goto error; |