diff options
author | Denis Kenzior <denkenz@gmail.com> | 2016-12-01 11:26:15 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2016-12-01 11:27:21 -0600 |
commit | 3c473979c7873bfab64c7d60a65b70a504bf1b19 (patch) | |
tree | cda073c3472b33b1530909ee83ed9b914cdb02e4 /drivers/ubloxmodem | |
parent | 83783a71d8f2a29ef130fb6993b6689bb9b5c9f0 (diff) | |
download | ofono-3c473979c7873bfab64c7d60a65b70a504bf1b19.tar.gz |
ubloxmodem: Fixup minor style issues
- useless return at the end of a function
- mixed tabs & spaces for indentation
- over 80 characters for the comment
- line > 80 characters due to access technology conversion. Replaced
with a direct assignment.
Diffstat (limited to 'drivers/ubloxmodem')
-rw-r--r-- | drivers/ubloxmodem/netmon.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ubloxmodem/netmon.c b/drivers/ubloxmodem/netmon.c index f086a397..0749078f 100644 --- a/drivers/ubloxmodem/netmon.c +++ b/drivers/ubloxmodem/netmon.c @@ -196,8 +196,8 @@ static void cesq_cb(gboolean ok, GAtResult *result, gpointer user_data) } for (idx = 0; idx < _MAX; idx++) { - ok = g_at_result_iter_next_number(&iter, &number); + if (!ok) { /* Ignore and do not fail */ DBG(" CESQ: error parsing idx: %d ", idx); @@ -233,10 +233,12 @@ static void cesq_cb(gboolean ok, GAtResult *result, gpointer user_data) DBG(" RSRQ %d ", cbd->rsrq); DBG(" RSRP %d ", cbd->rsrp); - /* We never fail at this point we always send what we collected so far */ + /* + * We never fail at this point we always send what we collected so + * far + */ out: ublox_netmon_finish_success(cbd); - return; } static void cops_cb(gboolean ok, GAtResult *result, gpointer user_data) @@ -271,13 +273,13 @@ static void cops_cb(gboolean ok, GAtResult *result, gpointer user_data) /* Default to GSM */ if (g_at_result_iter_next_number(&iter, &tech) == FALSE) - cbd->op.tech = ublox_map_radio_access_technology(ACCESS_TECHNOLOGY_GSM); + cbd->op.tech = OFONO_NETMON_CELL_TYPE_GSM; else cbd->op.tech = ublox_map_radio_access_technology(tech); cbd = req_cb_data_ref(cbd); if (g_at_chat_send(nmd->chat, "AT+CESQ", cesq_prefix, - cesq_cb, cbd, req_cb_data_unref) == 0) { + cesq_cb, cbd, req_cb_data_unref) == 0) { CALLBACK_WITH_FAILURE(cbd->cb, cbd->data); req_cb_data_unref(cbd); } @@ -294,7 +296,7 @@ static void ublox_netmon_request_update(struct ofono_netmon *netmon, cbd = req_cb_data_new0(cb, data, netmon); if (g_at_chat_send(nmd->chat, "AT+COPS?", cops_prefix, - cops_cb, cbd, req_cb_data_unref) == 0) { + cops_cb, cbd, req_cb_data_unref) == 0) { CALLBACK_WITH_FAILURE(cbd->cb, cbd->data); req_cb_data_unref(cbd); } |