[Asterisk-cvs] asterisk enum.c,1.23,1.24

markster at lists.digium.com markster at lists.digium.com
Sat Mar 12 11:02:08 CST 2005


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

Modified Files:
	enum.c 
Log Message:
Fix casting error (bug #3681, take 2)


Index: enum.c
===================================================================
RCS file: /usr/cvsroot/asterisk/enum.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- enum.c	12 Mar 2005 06:56:22 -0000	1.23
+++ enum.c	12 Mar 2005 16:58:04 -0000	1.24
@@ -276,7 +276,7 @@
 	/* answer is not null-terminated, but should be */
 	/* this is safe to do, as answer has extra bytes on the end we can 
            safely overwrite with a null */
-	answer[len] = (u_char)"\0";
+	answer[len] = '\0';
 	/* now increment len so that len includes the null, so that we can
 	   compare apples to apples */
 	len +=1;
@@ -285,7 +285,7 @@
 	strncpy(c->txt, answer, len < c->txtlen ? len-1 : (c->txtlen)-1);
 	
 	/* just to be safe, let's make sure c->txt is null terminated */
-	c->txt[(c->txtlen)-1] = (char)"\0";
+	c->txt[(c->txtlen)-1] = '\0';
 
 	return 1;
 }




More information about the svn-commits mailing list