summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>2011-01-10 15:15:16 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-01-10 16:31:32 -0800
commit60823390406af98b91255cea2935e35776417083 (patch)
tree1cfed9842c70b1fef9b40df57df6304593def389 /src
parent08a8c06963bd9e14b42c4b96976e1de68f06cb33 (diff)
downloadofono-60823390406af98b91255cea2935e35776417083.tar.bz2
gprs: avoid useless loop iteration
Diffstat (limited to 'src')
-rw-r--r--src/gprs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gprs.c b/src/gprs.c
index aeb505f4..0e86bdf5 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -1993,12 +1993,12 @@ void ofono_gprs_context_deactivated(struct ofono_gprs_context *gc,
for (l = gc->gprs->contexts; l; l = l->next) {
ctx = l->data;
- if (ctx->active == FALSE)
- continue;
-
if (ctx->context.cid != cid)
continue;
+ if (ctx->active == FALSE)
+ break;
+
gprs_cid_release(ctx->gprs, ctx->context.cid);
ctx->context.cid = 0;
ctx->active = FALSE;