mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 08:49:01 +00:00
make compiler quiet about null termination.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7988 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2a98f0639b
commit
12e7b5f016
@ -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)
|
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;
|
char *bit_str;
|
||||||
int32_t bits;
|
int32_t bits;
|
||||||
|
|
||||||
strncpy(host, string, sizeof(host) - 1);
|
switch_copy_string(host, string, sizeof(host));
|
||||||
bit_str = strchr(host, '/');
|
bit_str = strchr(host, '/');
|
||||||
|
|
||||||
if (!bit_str) {
|
if (!bit_str) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user