minor optimizations
authorKevin P. Fleming <kpfleming@digium.com>
Mon, 26 Sep 2005 03:02:06 +0000 (03:02 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Mon, 26 Sep 2005 03:02:06 +0000 (03:02 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6659 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx.c

diff --git a/pbx.c b/pbx.c
index 0bab973..db7e482 100755 (executable)
--- a/pbx.c
+++ b/pbx.c
@@ -1559,9 +1559,8 @@ static void pbx_substitute_variables(char *passdata, int datalen, struct ast_cha
        memset(passdata, 0, datalen);
                
        /* No variables or expressions in e->data, so why scan it? */
-       if (!strstr(e->data,"${") && !strstr(e->data,"$[") && !strstr(e->data,"$(")) {
+       if (!strchr(e->data, '$') && !strstr(e->data,"${") && !strstr(e->data,"$[") && !strstr(e->data,"$(")) {
                ast_copy_string(passdata, e->data, datalen);
-               passdata[datalen-1] = '\0';
                return;
        }