Skip to content
Snippets Groups Projects
Commit 3697f7db authored by James Golovich's avatar James Golovich
Browse files

Make app_txtcidname.c use ast_strlen_zero and cleanup the code a bit

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 9de6aed3
Branches
Tags
No related merge requests found
...@@ -65,11 +65,10 @@ static int txtcidname_exec(struct ast_channel *chan, void *data) ...@@ -65,11 +65,10 @@ static int txtcidname_exec(struct ast_channel *chan, void *data)
LOCAL_USER_REMOVE(u); LOCAL_USER_REMOVE(u);
/* Parse it out */ /* Parse it out */
if (res > 0) { if (res > 0) {
if(strlen(txt) > 0) if (!ast_strlen_zero(txt)) {
{
pbx_builtin_setvar_helper(chan, "TXTCIDNAME", txt); pbx_builtin_setvar_helper(chan, "TXTCIDNAME", txt);
#if 0 #if 0
printf("TXTCIDNAME got '%s'\n", txt); ast_log(LOG_DEBUG, "TXTCIDNAME got '%s'\n", txt);
#endif #endif
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment