[Asterisk-cvs] asterisk file.c,1.40,1.41

citats at lists.digium.com citats at lists.digium.com
Thu May 6 17:08:14 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv11743

Modified Files:
	file.c 
Log Message:
Use ast_strlen_zero in file.c


Index: file.c
===================================================================
RCS file: /usr/cvsroot/asterisk/file.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- file.c	21 Apr 2004 03:53:15 -0000	1.40
+++ file.c	6 May 2004 21:17:06 -0000	1.41
@@ -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 @@
 	/* 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 @@
 	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 @@
 	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, '/');




More information about the svn-commits mailing list