[Freeswitch-svn] [commit] r7988 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Mon Mar 31 12:06:08 EDT 2008


Author: mikej
Date: Mon Mar 31 12:06:08 2008
New Revision: 7988

Modified:
   freeswitch/trunk/src/switch_utils.c

Log:
make compiler quiet about null termination.

Modified: freeswitch/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/trunk/src/switch_utils.c	(original)
+++ freeswitch/trunk/src/switch_utils.c	Mon Mar 31 12:06:08 2008
@@ -143,11 +143,11 @@
 
 SWITCH_DECLARE(int) switch_parse_cidr(const char *string, uint32_t *ip, uint32_t *mask, uint32_t *bitp)
 {
-	char host[128] = "";
+	char host[128];
 	char *bit_str;
 	int32_t bits;
 
-	strncpy(host, string, sizeof(host) - 1);
+	switch_copy_string(host, string, sizeof(host));
 	bit_str = strchr(host, '/');
 
 	if (!bit_str) {



More information about the Freeswitch-svn mailing list