Archived
14
0
Fork 0

Turn 4 lines of code into 1 line that does the same thing.

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77538 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
file 2007-07-27 16:31:55 +00:00
parent f54aa54210
commit 9f83c7c5d3

View file

@ -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);