diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-04-14 22:17:27 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-04-14 22:17:27 +0000 |
commit | b20429bd6b956a9235a86f201be9f55fc084a955 (patch) | |
tree | 3ea92d47aef93ac89dd3d52f065055a2c981b6ea /asterisk.c | |
parent | 62712ea668a58c32ba64f9019270df57f13ee8b1 (diff) |
normalize cli completion code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'asterisk.c')
-rw-r--r-- | asterisk.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/asterisk.c b/asterisk.c index 642f1b5d8..ad9cfb831 100644 --- a/asterisk.c +++ b/asterisk.c @@ -548,11 +548,9 @@ static char *complete_show_version_files(const char *line, const char *word, int AST_LIST_LOCK(&file_versions); AST_LIST_TRAVERSE(&file_versions, find, list) { - if (!strncasecmp(word, find->file, matchlen)) { - if (++which > state) { - ret = strdup(find->file); - break; - } + if (!strncasecmp(word, find->file, matchlen) && ++which > state) { + ret = ast_strdup(find->file); + break; } } AST_LIST_UNLOCK(&file_versions); |