convert a couple uses of strlen() to use ast_strlen_zero()
[asterisk/asterisk.git] / 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);