--- util-radix-tree.c.orig 2015-01-29 09:22:12.422829497 -0800 +++ util-radix-tree.c 2015-01-29 09:23:47.584924110 -0800 @@ -1704,22 +1704,22 @@ tree = SCRadixCreateRadixTree(free, NULL); /* add the keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.1", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.2", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.3", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.4", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); @@ -1728,75 +1728,75 @@ SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); /* test for the existance of a key */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.6", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); /* test for the existance of a key */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.4", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); /* continue adding keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "220.168.1.2", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.5", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.18", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); /* test the existence of keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.3", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "127.234.2.62", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.1", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.5", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.2", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.3", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.4", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "220.168.1.2", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.18", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); @@ -1815,98 +1815,98 @@ tree = SCRadixCreateRadixTree(free, NULL); /* add the keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.1", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.2", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.3", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.4", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "220.168.1.2", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.5", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.18", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); /* remove the keys from the tree */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.1", &servaddr.sin_addr) <= 0) return 0; SCRadixRemoveKeyIPV4((uint8_t *)&servaddr.sin_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.3", &servaddr.sin_addr) <= 0) return 0; SCRadixRemoveKeyIPV4((uint8_t *)&servaddr.sin_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.4", &servaddr.sin_addr) <= 0) return 0; SCRadixRemoveKeyIPV4((uint8_t *)&servaddr.sin_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.18", &servaddr.sin_addr) <= 0) return 0; SCRadixRemoveKeyIPV4((uint8_t *)&servaddr.sin_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.1", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.2", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.3", &servaddr.sin_addr) <= 0) return 0; SCRadixRemoveKeyIPV4((uint8_t *)&servaddr.sin_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "220.168.1.2", &servaddr.sin_addr) <= 0) return 0; SCRadixRemoveKeyIPV4((uint8_t *)&servaddr.sin_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.5", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.2", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.2", &servaddr.sin_addr) <= 0) return 0; SCRadixRemoveKeyIPV4((uint8_t *)&servaddr.sin_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.5", &servaddr.sin_addr) <= 0) return 0; SCRadixRemoveKeyIPV4((uint8_t *)&servaddr.sin_addr, tree); @@ -2021,25 +2021,25 @@ tree = SCRadixCreateRadixTree(free, NULL); /* add the keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "BD15:9791:5346:6223:AADB:8713:9882:2432", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "4444:0BF7:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; @@ -2048,74 +2048,74 @@ /* Try to add the prefix that already exists in the tree */ SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "5555:0BF1:ABCD:ADEA:7922:ABCD:9124:2375", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBCA:1245:2342:1111:2212", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:1251:7422:1112:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); /* test the existence of keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "BD15:9791:5346:6223:AADB:8713:9882:2432", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "4444:0BF7:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABC2:ABCD:DBCA:1245:2342:1111:2212", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF5:5346:1251:7422:1112:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "5555:0BF1:ABCD:ADEA:7922:ABCD:9124:2375", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBCA:1245:2342:1111:2212", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:1251:7422:1112:9124:2315", &servaddr.sin6_addr) <= 0) return 0; @@ -2135,25 +2135,25 @@ tree = SCRadixCreateRadixTree(free, NULL); /* add the keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "BD15:9791:5346:6223:AADB:8713:9882:2432", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "4444:0BF7:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; @@ -2162,199 +2162,199 @@ /* Try to add the prefix that already exists in the tree */ SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "5555:0BF1:ABCD:ADEA:7922:ABCD:9124:2375", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBCA:1245:2342:1111:2212", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:1251:7422:1112:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); /* test the existence of keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "8888:0BF1:5346:BDEA:6422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2006:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "BD15:9791:5346:6223:AADB:8713:9882:2432", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); /* test for existance */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "4444:0BF7:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "5555:0BF1:ABCD:ADEA:7922:ABCD:9124:2375", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBCA:1245:2342:1111:2212", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:1251:7422:1112:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:DDDD:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); /* remove keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixRemoveKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "BD15:9791:5346:6223:AADB:8713:9882:2432", &servaddr.sin6_addr) <= 0) return 0; SCRadixRemoveKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree); /* test for existance */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "BD15:9791:5346:6223:AADB:8713:9882:2432", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "4444:0BF7:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "5555:0BF1:ABCD:ADEA:7922:ABCD:9124:2375", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBCA:1245:2342:1111:2212", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); /* remove keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; SCRadixRemoveKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "4444:0BF7:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixRemoveKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "5555:0BF1:ABCD:ADEA:7922:ABCD:9124:2375", &servaddr.sin6_addr) <= 0) return 0; SCRadixRemoveKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBCA:1245:2342:1111:2212", &servaddr.sin6_addr) <= 0) return 0; SCRadixRemoveKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree); /* test for existance */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "BD15:9791:5346:6223:AADB:8713:9882:2432", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "4444:0BF7:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "5555:0BF1:ABCD:ADEA:7922:ABCD:9124:2375", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBCA:1245:2342:1111:2212", &servaddr.sin6_addr) <= 0) return 0; @@ -2374,52 +2374,52 @@ tree = SCRadixCreateRadixTree(free, NULL); /* add the keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.1", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.2", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.3", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.4", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "220.168.1.2", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.5", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.18", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 24); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.192.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 18); @@ -2429,42 +2429,42 @@ SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); /* test for the existance of a key */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.6", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.170.1.6", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.145", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.64.6", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.191.6", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.224.6", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.174.224.6", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.175.224.6", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); @@ -2484,53 +2484,53 @@ tree = SCRadixCreateRadixTree(free, NULL); /* add the keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.192.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.192.235.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 24); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.4", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "220.168.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.224.1.5", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.0", &servaddr.sin_addr) <= 0) return 0; node[0] = SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 24); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.45", &servaddr.sin_addr) <= 0) return 0; node[1] = SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 18); @@ -2540,38 +2540,38 @@ SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); /* test for the existance of a key */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.53", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node[0]); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.45", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node[1]); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.45", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node[1]); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.78", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node[0]); /* let us remove a netblock */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.0", &servaddr.sin_addr) <= 0) return 0; SCRadixRemoveKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, 24); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.78", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.127.78", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); @@ -2591,52 +2591,52 @@ tree = SCRadixCreateRadixTree(free, NULL); /* add the keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.192.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.192.235.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 24); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.4", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "220.168.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.224.1.5", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 24); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.45", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 18); @@ -2650,96 +2650,96 @@ node = SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 0); /* test for the existance of a key */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.53", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.45", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.78", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.127.78", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "1.1.1.1", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.255.254.25", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "169.255.254.25", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "0.0.0.0", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.224.1.5", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL && SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "245.63.62.121", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL && SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.224.1.6", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL && SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node); /* remove node 0.0.0.0 */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "0.0.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixRemoveKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, 0); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.224.1.6", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.127.78", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "1.1.1.1", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.255.254.25", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "169.255.254.25", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "0.0.0.0", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); @@ -2759,52 +2759,52 @@ tree = SCRadixCreateRadixTree(free, NULL); /* add the keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.192.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.192.235.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 24); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.167.1.4", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "220.168.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "253.224.1.5", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.0", &servaddr.sin_addr) <= 0) return 0; node[0] = SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 24); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.45", &servaddr.sin_addr) <= 0) return 0; node[1] = SCRadixAddKeyIPV4((uint8_t *)&servaddr.sin_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 18); @@ -2814,57 +2814,57 @@ SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 32); /* test for the existance of a key */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.53", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node[0]); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.53", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.45", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node[1]); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.45", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node[1]); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.45", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node[1]); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.128.78", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4BestMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == node[0]); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.171.127.78", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "225.175.21.228", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "225.175.21.224", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "225.175.21.229", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "225.175.21.230", &servaddr.sin_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV4ExactMatch((uint8_t *)&servaddr.sin_addr, tree, NULL) == NULL); @@ -2883,116 +2883,116 @@ tree = SCRadixCreateRadixTree(free, NULL); /* add the keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "BD15:9791:5346:6223:AADB:8713:9882:2432", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "4444:0BF7:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "5555:0BF1:ABCD:ADEA:7922:ABCD:9124:2375", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DB00:0000:0000:0000:0000", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6Netblock((uint8_t *)&servaddr.sin6_addr, tree, NULL, 56); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBAA:1245:2342:1145:6241", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); /* test the existence of keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "BD15:9791:5346:6223:AADB:8713:9882:2432", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6BestMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "4444:0BF7:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABC2:ABCD:DBCA:1245:2342:1111:2212", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF5:5346:1251:7422:1112:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "5555:0BF1:ABCD:ADEA:7922:ABCD:9124:2375", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBCA:1245:2342:1111:2212", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6BestMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBAA:1245:2342:1146:6241", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6BestMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBAA:1245:2342:1356:1241", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6BestMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DAAA:1245:2342:1146:6241", &servaddr.sin6_addr) <= 0) return 0; @@ -3014,87 +3014,87 @@ tree = SCRadixCreateRadixTree(free, NULL); /* add the keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2003:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "BD15:9791:5346:6223:AADB:8713:9882:2432", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "1111:A21B:6221:BDEA:BBBA::DBAA:9861", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "4444:0BF7:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "5555:0BF1:ABCD:ADEA:7922:ABCD:9124:2375", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DB00:0000:0000:0000:0000", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6Netblock((uint8_t *)&servaddr.sin6_addr, tree, NULL, 56); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBAA:1245:2342:1145:6241", &servaddr.sin6_addr) <= 0) return 0; SCRadixAddKeyIPV6((uint8_t *)&servaddr.sin6_addr, tree, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "::", &servaddr.sin6_addr) <= 0) return 0; node = SCRadixAddKeyIPV6Netblock((uint8_t *)&servaddr.sin6_addr, tree, NULL, 0); /* test the existence of keys */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2004:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2004:0BF1:5346:BDEA:7422:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6BestMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2004:0BF1:5346:B116:2362:8713:9124:2315", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6BestMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "2004:0B23:3252:BDEA:7422:8713:9124:2341", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6BestMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) == node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBAA:1245:2342:1145:6241", &servaddr.sin6_addr) <= 0) return 0; result &= (SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != NULL && SCRadixFindKeyIPV6ExactMatch((uint8_t *)&servaddr.sin6_addr, tree, NULL) != node); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DBCA:ABCD:ABCD:DBAA:1245:2342:1145:6241", &servaddr.sin6_addr) <= 0) return 0; @@ -3122,7 +3122,7 @@ uint32_t *user; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.0.1", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3182,7 +3182,7 @@ uint32_t *user; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.1", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3242,7 +3242,7 @@ uint32_t *user; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "10.0.0.1", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3302,7 +3302,7 @@ uint32_t *user; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "172.26.0.1", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3361,7 +3361,7 @@ uint32_t *user; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "0.0.0.0", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3377,7 +3377,7 @@ SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, user, 0); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.1.15", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3403,7 +3403,7 @@ user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "177.0.0.0", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3419,7 +3419,7 @@ SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, user, 8); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "177.168.1.15", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3445,7 +3445,7 @@ user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "178.168.1.15", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3470,7 +3470,7 @@ } user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "177.168.0.0", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3486,7 +3486,7 @@ SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, user, 12); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "177.168.1.15", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3511,7 +3511,7 @@ } user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "177.167.1.15", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3536,7 +3536,7 @@ } user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "177.178.1.15", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3561,7 +3561,7 @@ } user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "197.178.1.15", &servaddr.sin_addr) <= 0) { result = 0; goto end; @@ -3608,7 +3608,7 @@ uint32_t *user; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "ABAB:CDCD:ABAB:CDCD:1234:4321:1234:4321", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3668,7 +3668,7 @@ uint32_t *user; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "ff00::1", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3728,7 +3728,7 @@ uint32_t *user; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "ff00::192:168:1:1", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3788,7 +3788,7 @@ uint32_t *user; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "FF00:ABCD:BCDA::ABCD", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3847,7 +3847,7 @@ uint32_t *user; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "::", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3863,7 +3863,7 @@ SCRadixAddKeyIPV6Netblock((uint8_t *)&servaddr.sin6_addr, tree, user, 0); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "ABCD::1", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3888,7 +3888,7 @@ } user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "ABCD::0", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3904,7 +3904,7 @@ SCRadixAddKeyIPV6Netblock((uint8_t *)&servaddr.sin6_addr, tree, user, 8); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "ABCD::1", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3930,7 +3930,7 @@ } user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "DCBA::1", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3956,7 +3956,7 @@ } user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "ABCD:ABCD::0", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3972,7 +3972,7 @@ SCRadixAddKeyIPV6Netblock((uint8_t *)&servaddr.sin6_addr, tree, user, 12); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "ABCD:ABCD::1", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -3997,7 +3997,7 @@ } user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "ABCD:AAAA::1", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -4022,7 +4022,7 @@ } user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "ABAB::1", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -4047,7 +4047,7 @@ } user_data = NULL; - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET6, "CABD::1", &servaddr.sin6_addr) <= 0) { result = 0; goto end; @@ -4092,13 +4092,13 @@ tree = SCRadixCreateRadixTree(free, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.0.0", &servaddr.sin_addr) <= 0) return 0; SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, NULL, 16); /* test for the existance of a key */ - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "192.168.128.53", &servaddr.sin_addr) <= 0) return 0; @@ -4124,7 +4124,7 @@ tree = SCRadixCreateRadixTree(free, NULL); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "0.0.0.0", &servaddr.sin_addr) <= 0) return 0; tmp = SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, str, 0); @@ -4135,7 +4135,7 @@ } str = SCStrdup("Hello1"); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "176.0.0.1", &servaddr.sin_addr) <= 0) return 0; tmp = SCRadixAddKeyIPV4Netblock((uint8_t *)&servaddr.sin_addr, tree, str, 5); @@ -4146,7 +4146,7 @@ } str = SCStrdup("Hello1"); - bzero(&servaddr, sizeof(servaddr)); + memset(&servaddr, 0, sizeof(servaddr)); if (inet_pton(AF_INET, "0.0.0.0", &servaddr.sin_addr) <= 0) { SCFree(str); return 0;