diff options
author | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-06 21:17:06 +0000 |
---|---|---|
committer | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-06 21:17:06 +0000 |
commit | 84e623b9465d539e51467953aaf3d4613b3ee7a4 (patch) | |
tree | e8255f608f232307f4e63506e3c55ccb10c8b328 | |
parent | 07aec9c5fb37e85cfb72912506fa4515f0837d8e (diff) |
Use ast_strlen_zero in file.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2911 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | file.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -19,6 +19,7 @@ #include <asterisk/sched.h> #include <asterisk/options.h> #include <asterisk/translate.h> +#include <asterisk/utils.h> #include <errno.h> #include <unistd.h> #include <stdlib.h> @@ -444,7 +445,7 @@ struct ast_filestream *ast_openstream(struct ast_channel *chan, char *filename, /* do this first, otherwise we detect the wrong writeformat */ if (chan->generator) ast_deactivate_generator(chan); - if (preflang && strlen(preflang)) { + if (preflang && !ast_strlen_zero(preflang)) { strncpy(filename3, filename, sizeof(filename3) - 1); endpart = strrchr(filename3, '/'); if (endpart) { @@ -493,7 +494,7 @@ struct ast_filestream *ast_openvstream(struct ast_channel *chan, char *filename, char lang2[MAX_LANGUAGE]; /* XXX H.263 only XXX */ char *fmt = "h263"; - if (preflang && strlen(preflang)) { + if (preflang && !ast_strlen_zero(preflang)) { snprintf(filename2, sizeof(filename2), "%s/%s", preflang, filename); fmts = ast_fileexists(filename2, fmt, NULL); if (fmts < 1) { @@ -678,7 +679,7 @@ int ast_fileexists(char *filename, char *fmt, char *preflang) char *c; char lang2[MAX_LANGUAGE]; int res = -1; - if (preflang && strlen(preflang)) { + if (preflang && !ast_strlen_zero(preflang)) { /* Insert the language between the last two parts of the path */ strncpy(tmp, filename, sizeof(tmp) - 1); c = strrchr(tmp, '/'); |