summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2007-06-13 17:06:53 +0000
committerJason Parker <jparker@digium.com>2007-06-13 17:06:53 +0000
commit63535ada608f1f833067e861a3eca2d7d968c049 (patch)
treea9fb3e6b0469ea54b0205568d362b41049fb3c96
parent156d6338b2e6e0c338a18b8fe76a7274b1445900 (diff)
Fixes for ast_strlen_zero() janitor project.
Issue 9968, patch by eliel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c4
-rw-r--r--main/pbx.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 56b321ef3..fded1c9e8 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7494,7 +7494,7 @@ static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init)
}
/* This new INVITE is part of an attended transfer. Make sure that the
other end knows and replace the current call with this new call */
- if (p->options && p->options->replaces && !ast_strlen_zero(p->options->replaces)) {
+ if (p->options && !ast_strlen_zero(p->options->replaces)) {
add_header(&req, "Replaces", p->options->replaces);
add_header(&req, "Require", "replaces");
}
@@ -15025,7 +15025,7 @@ static int handle_request_refer(struct sip_pvt *p, struct sip_request *req, int
pbx_builtin_setvar_helper(current.chan2, "_SIPTRANSFER_REFERER", p->refer->referred_by);
}
/* Generate a Replaces string to be used in the INVITE during attended transfer */
- if (p->refer->replaces_callid && !ast_strlen_zero(p->refer->replaces_callid)) {
+ if (!ast_strlen_zero(p->refer->replaces_callid)) {
char tempheader[BUFSIZ];
snprintf(tempheader, sizeof(tempheader), "%s%s%s%s%s", p->refer->replaces_callid,
p->refer->replaces_callid_totag ? ";to-tag=" : "",
diff --git a/main/pbx.c b/main/pbx.c
index 730b31837..dbd12039a 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -3746,7 +3746,7 @@ static int manager_show_dialplan(struct mansession *s, const struct message *m)
/* Variables used for different counters */
struct dialplan_counters counters;
- if (id && !ast_strlen_zero(id))
+ if (!ast_strlen_zero(id))
snprintf(idtext, sizeof(idtext), "ActionID: %s\r\n", id);
else
idtext[0] = '\0';