summaryrefslogtreecommitdiff
path: root/drivers/mbmmodem
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2019-04-29 14:11:22 -0500
committerDenis Kenzior <denkenz@gmail.com>2019-04-29 14:11:22 -0500
commitb126407632ef5f2c1196aef666d0fb09547acaa5 (patch)
tree3aa1ddd4cbd068e25492d2f9ff9bb649951aa741 /drivers/mbmmodem
parent4bb6e096613fc973125ecf8bba2d478d3f82356a (diff)
downloadofono-b126407632ef5f2c1196aef666d0fb09547acaa5.tar.gz
mbmmodem: Remove unneeded if
Diffstat (limited to 'drivers/mbmmodem')
-rw-r--r--drivers/mbmmodem/gprs-context.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/mbmmodem/gprs-context.c b/drivers/mbmmodem/gprs-context.c
index c48e7260..f873e283 100644
--- a/drivers/mbmmodem/gprs-context.c
+++ b/drivers/mbmmodem/gprs-context.c
@@ -367,7 +367,6 @@ static void mbm_gprs_activate_primary(struct ofono_gprs_context *gc,
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
struct cb_data *cbd = cb_data_new(cb, data);
char buf[AUTH_BUF_LENGTH];
- int len;
/* IPv6 support not implemented */
if (ctx->proto != OFONO_GPRS_PROTO_IP)
@@ -376,14 +375,10 @@ static void mbm_gprs_activate_primary(struct ofono_gprs_context *gc,
DBG("cid %u", ctx->cid);
gcd->active_context = ctx->cid;
-
cbd->user = gc;
- len = snprintf(buf, sizeof(buf), "AT+CGDCONT=%u,\"IP\"", ctx->cid);
-
- if (ctx->apn)
- snprintf(buf + len, sizeof(buf) - len - 3, ",\"%s\"",
- ctx->apn);
+ snprintf(buf, sizeof(buf), "AT+CGDCONT=%u,\"IP\",\"%s\"",
+ ctx->cid, ctx->apn);
if (g_at_chat_send(gcd->chat, buf, none_prefix,
mbm_cgdcont_cb, cbd, g_free) == 0)