diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2017-06-12 03:41:35 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2017-06-13 20:22:19 +0700 |
commit | f17869546651601b24a2ac333cff05f7526f63a3 (patch) | |
tree | d7e4380981304d972a29ebb2286e8719e0cbd151 /src | |
parent | d1c7323f3c48f7983e87a2e1230623aa29fa83f4 (diff) |
gb/gprs_bssgp.c: avoid valueless goto usage
Change-Id: I0c2aaf1ab462c923d62232f1a63fae1e4eb18b4d
Diffstat (limited to 'src')
-rw-r--r-- | src/gb/gprs_bssgp.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index aa6e37bf..142f5898 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -698,24 +698,17 @@ static int bssgp_fc_needs_queueing(struct bssgp_flow_control *fc, uint32_t pdu_l /* ... and subtract the number of leaked bytes */ bucket_predicted -= leaked; - if (bucket_predicted < pdu_len) { - /* this is just to make sure the bucket doesn't underflow */ - bucket_predicted = pdu_len; - goto pass; - } + if (bucket_predicted < pdu_len) + return 0; if (bucket_predicted <= fc->bucket_size_max) { /* the bucket is not full yet, we can pass the packet */ fc->bucket_counter = bucket_predicted; - goto pass; + return 0; } /* bucket is full, PDU needs to be delayed */ return 1; - -pass: - /* if we reach here, the PDU can pass */ - return 0; } /* output callback for BVC flow control */ |