convert a couple uses of strlen() to use ast_strlen_zero()
authorRussell Bryant <russell@russellbryant.com>
Sun, 19 Mar 2006 15:42:49 +0000 (15:42 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sun, 19 Mar 2006 15:42:49 +0000 (15:42 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13621 65c4cc65-6c06-0410-ace0-fbb531ad65f3

image.c

diff --git a/image.c b/image.c
index 7108974..3e8e393 100644 (file)
--- a/image.c
+++ b/image.c
@@ -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);