diff options
author | Joshua Colp <jcolp@digium.com> | 2007-07-27 16:31:55 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2007-07-27 16:31:55 +0000 |
commit | 111250f2aeda9ae7596575201b4973fc28a878eb (patch) | |
tree | c5231d982cecc2c950c9b010d1a7765df07289ae /channels | |
parent | f6498f16bb71d811c735012fad89495484c4070c (diff) |
Turn 4 lines of code into 1 line that does the same thing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 17b07684c..9500d2251 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8974,10 +8974,7 @@ static void sip_peer_hold(struct sip_pvt *p, int hold) return; /* If they put someone on hold, increment the value... otherwise decrement it */ - if (hold) - ast_atomic_fetchadd_int(&peer->onHold, +1); - else - ast_atomic_fetchadd_int(&peer->onHold, -1); + ast_atomic_fetchadd_int(&peer->onHold, (hold ? +1 : -1)); /* Request device state update */ ast_device_state_changed("SIP/%s", peer->name); |