summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctc4xxp
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-06-29 20:20:19 +0000
committerShaun Ruffell <sruffell@digium.com>2010-06-29 20:20:19 +0000
commite34e04b441aadf5296bd7469d5fd7c06773df741 (patch)
treeb0118ea69052def0e979701c47e4d1e2e1f15f9b /drivers/dahdi/wctc4xxp
parent7fe4c612b9167a8ebe5e9d086e83eacca8da5e6e (diff)
wctc4xxp: Fix "operation on may be undefined" warning.
gcc 4.5.0 was generating a warning on the changed line, and the discussion at http://gcc.gnu.org/ml/gcc/2004-10/msg00024.html explains why. Essentially, the only thing guaranteed with the preincrement operator is that the value will be incremented before the assignment. It's undefined where in the sequence the mask will be applied. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8831 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctc4xxp')
-rw-r--r--drivers/dahdi/wctc4xxp/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index df6cd90..1f250be 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -934,7 +934,7 @@ wctc4xxp_submit(struct wctc4xxp_descriptor_ring *dr, struct tcb *c)
SET_OWNED(d); /* That's it until the hardware is done with it. */
dr->pending[dr->tail] = c;
- dr->tail = ++dr->tail & DRING_MASK;
+ dr->tail = (dr->tail + 1) & DRING_MASK;
++dr->count;
spin_unlock_irqrestore(&dr->lock, flags);
return 0;