diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-24 22:34:45 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-24 22:34:45 +0000 |
commit | 1c0316797731dcd45414a072079d0be63738fe3c (patch) | |
tree | 1a736ed928b6cb61baaba2c887fe7a9055a90f17 /apps | |
parent | f45f3aba22856d596217bca72f77409148760647 (diff) |
Change NULL pointer check to be ast_strlen_zero.
The 'digit' variable is guaranteed to be non-NULL, so the if
statement could never evaluate true. Changing to ast_strlen_zero
makes the logic correct.
This was found while reviewing ast_channel_ao2 code review.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@184078 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_senddtmf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c index e48ba4fe0..08833fd54 100644 --- a/apps/app_senddtmf.c +++ b/apps/app_senddtmf.c @@ -104,7 +104,7 @@ static int manager_play_dtmf(struct mansession *s, const struct message *m) astman_send_error(s, m, "Channel not specified"); return 0; } - if (!digit) { + if (ast_strlen_zero(digit)) { astman_send_error(s, m, "No digit specified"); ast_mutex_unlock(&chan->lock); return 0; |