Remove unnecessary checks before calls to ast_strlen_zero. Also, change

some places where strlen is used instead of ast_strlen_zero


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2005-10-27 02:19:37 +00:00
parent 3332a8acd1
commit 9ddf0e4dce
14 changed files with 92 additions and 90 deletions

View File

@@ -580,9 +580,9 @@ struct ast_channel *ast_modem_new(struct ast_modem_pvt *i, int state)
if (!ast_strlen_zero(i->cid_name))
tmp->cid.cid_name = strdup(i->cid_name);
if (strlen(i->language))
if (!ast_strlen_zero(i->language))
strncpy(tmp->language,i->language, sizeof(tmp->language)-1);
if (strlen(i->dnid))
if (!ast_strlen_zero(i->dnid))
strncpy(tmp->exten, i->dnid, sizeof(tmp->exten) - 1);
i->owner = tmp;
ast_mutex_lock(&usecnt_lock);