From: Kevin P. Fleming Date: Wed, 30 Jan 2008 12:48:32 +0000 (+0000) Subject: simplify this code and eliminate the return value cast that is no longer necessary X-Git-Tag: 1.6.0-beta3~2^2~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e7a9c3292fd1702f6ef87ae61d93d1b8023e1ba;p=thirdparty%2Fasterisk.git simplify this code and eliminate the return value cast that is no longer necessary git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101196 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f9a70698d5..deeaae1234 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3261,10 +3261,7 @@ static int sip_sendhtml(struct ast_channel *chan, int subclass, const char *data /*! \brief Deliver SIP call ID for the call */ static const char *sip_get_callid(struct ast_channel *chan) { - struct sip_pvt *p = chan->tech_pvt; - if (!p) - return ""; - return ((char *)p->callid); + return chan->tech_pvt ? ((struct sip_pvt *) chan->tech_pvt)->callid : ""; } /*! \brief Send SIP MESSAGE text within a call