Branch Coverage

inet_pton.c
Criterion Covered Total %
branch 62 64 96.8


line true false branch
74 28040 2196 while ((ch = *src++) != '\0') {
75 21510 6530 if (ch >= '0' && ch <= '9') {
21506 4 if (ch >= '0' && ch <= '9') {
78 12779 8727 if (saw_digit && *tp == 0) {
1 12778 if (saw_digit && *tp == 0) {
81 2 21503 if (n > 255) {
85 8727 12776 if (!saw_digit) {
89 6530 4 } else if (ch == '.' && saw_digit) {
6530 0 } else if (ch == '.' && saw_digit) {
90 2 6528 if (octets == 4) {
136 40 799 if (*src == ':') {
137 1 39 if (*++src != ':') {
144 28525 827 while ((ch = tolower (*src++)) != '\0') {
148 23205 5320 if (pch != NULL) {
151 1 23204 if (val > 0xffff) {
157 5300 20 if (ch == ':') {
159 112 5188 if (!saw_xdigit) {
160 1 111 if (colonp) {
165 1 5187 } else if (*src == '\0') {
168 2 5185 if (tp + NS_INT16SZ > endp) {
177 17 3 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp)) {
16 1 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp)) {
182 15 1 if (ipv4_endp) {
184 1 14 if (diff > 15) {
193 15 0 if (diff) {
197 14 1 if (ipv4_endp) {
209 734 94 if (saw_xdigit) {
210 1 733 if (tp + NS_INT16SZ > endp) {
216 110 717 if (colonp != NULL) {
224 1 109 if (tp == endp) {
227 56 109 for (i = 1; i <= n; i++) {
234 46 826 while (tp < endp) {