Skip to content
Snippets Groups Projects
Commit 222afff8 authored by Russell Bryant's avatar Russell Bryant
Browse files

convert a couple uses of strlen() to use ast_strlen_zero()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent fc9d3ba2
No related branches found
No related tags found
No related merge requests found
......@@ -97,12 +97,12 @@ static int file_exists(char *filename)
static void make_filename(char *buf, int len, char *filename, const char *preflang, char *ext)
{
if (filename[0] == '/') {
if (preflang && strlen(preflang))
if (!ast_strlen_zero(preflang))
snprintf(buf, len, "%s-%s.%s", filename, preflang, ext);
else
snprintf(buf, len, "%s.%s", filename, ext);
} else {
if (preflang && strlen(preflang))
if (!ast_strlen_zero(preflang))
snprintf(buf, len, "%s/%s/%s-%s.%s", ast_config_AST_VAR_DIR, "images", filename, preflang, ext);
else
snprintf(buf, len, "%s/%s/%s.%s", ast_config_AST_VAR_DIR, "images", filename, ext);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment