From 12e7b5f016df2e38bc5cab6f2186e6ec92729848 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 31 Mar 2008 16:06:08 +0000 Subject: [PATCH] make compiler quiet about null termination. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7988 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_utils.c b/src/switch_utils.c index e272fc3311..8c2de888b4 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -143,11 +143,11 @@ SWITCH_DECLARE(switch_status_t) switch_network_list_add_host_mask(switch_network 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) {