summaryrefslogtreecommitdiffstats
path: root/ril/xmm6262
diff options
context:
space:
mode:
authorDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-07-09 18:47:06 +0200
committerDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-07-09 18:47:06 +0200
commitea4af61a1b3c1199bef63f0f34a5fe8d5f4dd8d0 (patch)
treecf0521497fe8b6e1da738229adf2debb0185d615 /ril/xmm6262
parent40b78381e3996924c56fef8e3d0ffe8d0aba50d6 (diff)
downloadhardware_samsung-ea4af61a1b3c1199bef63f0f34a5fe8d5f4dd8d0.zip
hardware_samsung-ea4af61a1b3c1199bef63f0f34a5fe8d5f4dd8d0.tar.gz
hardware_samsung-ea4af61a1b3c1199bef63f0f34a5fe8d5f4dd8d0.tar.bz2
samsung: libril: some code cleanup
Change-Id: Ie79369fce7d6c8832c3256c402a485090c177e61
Diffstat (limited to 'ril/xmm6262')
-rw-r--r--ril/xmm6262/libril/ril.cpp120
1 files changed, 57 insertions, 63 deletions
diff --git a/ril/xmm6262/libril/ril.cpp b/ril/xmm6262/libril/ril.cpp
index 391c976..933f6ee 100644
--- a/ril/xmm6262/libril/ril.cpp
+++ b/ril/xmm6262/libril/ril.cpp
@@ -1037,51 +1037,49 @@ dispatchGsmBrSmsCnf(Parcel &p, RequestInfo *pRI) {
goto invalid;
}
- {
- RIL_GSM_BroadcastSmsConfigInfo gsmBci[num];
- RIL_GSM_BroadcastSmsConfigInfo *gsmBciPtrs[num];
+ RIL_GSM_BroadcastSmsConfigInfo gsmBci[num];
+ RIL_GSM_BroadcastSmsConfigInfo *gsmBciPtrs[num];
- startRequest;
- for (int i = 0 ; i < num ; i++ ) {
- gsmBciPtrs[i] = &gsmBci[i];
+ startRequest;
+ for (int i = 0 ; i < num ; i++ ) {
+ gsmBciPtrs[i] = &gsmBci[i];
- status = p.readInt32(&t);
- gsmBci[i].fromServiceId = (int) t;
+ status = p.readInt32(&t);
+ gsmBci[i].fromServiceId = (int) t;
- status = p.readInt32(&t);
- gsmBci[i].toServiceId = (int) t;
+ status = p.readInt32(&t);
+ gsmBci[i].toServiceId = (int) t;
- status = p.readInt32(&t);
- gsmBci[i].fromCodeScheme = (int) t;
+ status = p.readInt32(&t);
+ gsmBci[i].fromCodeScheme = (int) t;
- status = p.readInt32(&t);
- gsmBci[i].toCodeScheme = (int) t;
+ status = p.readInt32(&t);
+ gsmBci[i].toCodeScheme = (int) t;
- status = p.readInt32(&t);
- gsmBci[i].selected = (uint8_t) t;
+ status = p.readInt32(&t);
+ gsmBci[i].selected = (uint8_t) t;
- appendPrintBuf("%s [%d: fromServiceId=%d, toServiceId =%d, \
- fromCodeScheme=%d, toCodeScheme=%d, selected =%d]", printBuf, i,
- gsmBci[i].fromServiceId, gsmBci[i].toServiceId,
- gsmBci[i].fromCodeScheme, gsmBci[i].toCodeScheme,
- gsmBci[i].selected);
- }
- closeRequest;
+ appendPrintBuf("%s [%d: fromServiceId=%d, toServiceId =%d, \
+ fromCodeScheme=%d, toCodeScheme=%d, selected =%d]", printBuf, i,
+ gsmBci[i].fromServiceId, gsmBci[i].toServiceId,
+ gsmBci[i].fromCodeScheme, gsmBci[i].toCodeScheme,
+ gsmBci[i].selected);
+ }
+ closeRequest;
- if (status != NO_ERROR) {
- goto invalid;
- }
+ if (status != NO_ERROR) {
+ goto invalid;
+ }
- s_callbacks.onRequest(pRI->pCI->requestNumber,
- gsmBciPtrs,
- num * sizeof(RIL_GSM_BroadcastSmsConfigInfo *),
- pRI);
+ s_callbacks.onRequest(pRI->pCI->requestNumber,
+ gsmBciPtrs,
+ num * sizeof(RIL_GSM_BroadcastSmsConfigInfo *),
+ pRI);
#ifdef MEMSET_FREED
- memset(gsmBci, 0, num * sizeof(RIL_GSM_BroadcastSmsConfigInfo));
- memset(gsmBciPtrs, 0, num * sizeof(RIL_GSM_BroadcastSmsConfigInfo *));
+ memset(gsmBci, 0, num * sizeof(RIL_GSM_BroadcastSmsConfigInfo));
+ memset(gsmBciPtrs, 0, num * sizeof(RIL_GSM_BroadcastSmsConfigInfo *));
#endif
- }
return;
@@ -1101,43 +1099,41 @@ dispatchCdmaBrSmsCnf(Parcel &p, RequestInfo *pRI) {
goto invalid;
}
- {
- RIL_CDMA_BroadcastSmsConfigInfo cdmaBci[num];
- RIL_CDMA_BroadcastSmsConfigInfo *cdmaBciPtrs[num];
+ RIL_CDMA_BroadcastSmsConfigInfo cdmaBci[num];
+ RIL_CDMA_BroadcastSmsConfigInfo *cdmaBciPtrs[num];
- startRequest;
- for (int i = 0 ; i < num ; i++ ) {
- cdmaBciPtrs[i] = &cdmaBci[i];
+ startRequest;
+ for (int i = 0 ; i < num ; i++ ) {
+ cdmaBciPtrs[i] = &cdmaBci[i];
- status = p.readInt32(&t);
- cdmaBci[i].service_category = (int) t;
+ status = p.readInt32(&t);
+ cdmaBci[i].service_category = (int) t;
- status = p.readInt32(&t);
- cdmaBci[i].language = (int) t;
+ status = p.readInt32(&t);
+ cdmaBci[i].language = (int) t;
- status = p.readInt32(&t);
- cdmaBci[i].selected = (uint8_t) t;
+ status = p.readInt32(&t);
+ cdmaBci[i].selected = (uint8_t) t;
- appendPrintBuf("%s [%d: service_category=%d, language =%d, \
- entries.bSelected =%d]", printBuf, i, cdmaBci[i].service_category,
- cdmaBci[i].language, cdmaBci[i].selected);
- }
- closeRequest;
+ appendPrintBuf("%s [%d: service_category=%d, language =%d, \
+ entries.bSelected =%d]", printBuf, i, cdmaBci[i].service_category,
+ cdmaBci[i].language, cdmaBci[i].selected);
+ }
+ closeRequest;
- if (status != NO_ERROR) {
- goto invalid;
- }
+ if (status != NO_ERROR) {
+ goto invalid;
+ }
- s_callbacks.onRequest(pRI->pCI->requestNumber,
- cdmaBciPtrs,
- num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo *),
- pRI);
+ s_callbacks.onRequest(pRI->pCI->requestNumber,
+ cdmaBciPtrs,
+ num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo *),
+ pRI);
#ifdef MEMSET_FREED
- memset(cdmaBci, 0, num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo));
- memset(cdmaBciPtrs, 0, num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo *));
+ memset(cdmaBci, 0, num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo));
+ memset(cdmaBciPtrs, 0, num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo *));
#endif
- }
return;
@@ -1489,7 +1485,7 @@ static int responseStringsNetworks(Parcel &p, void *response, size_t responselen
(int)responselen, (int)sizeof(char *));
return RIL_ERRNO_INVALID_RESPONSE;
}
-
+
if (response == NULL) {
p.writeInt32 (0);
} else {
@@ -2360,8 +2356,6 @@ static void sendSimStatusAppInfo(Parcel &p, int num_apps, RIL_AppStatus appStatu
}
static int responseSimStatus(Parcel &p, void *response, size_t responselen) {
- int i;
-
if (response == NULL && responselen != 0) {
ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;