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: https://origsvn.digium.com/svn/asterisk/branches/1.4@184078
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
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;