Lines Matching refs:cnt
41 int cnt = 0;
45 buf[cnt++] = (struct address){ .family = AF_INET };
47 buf[cnt++] = (struct address){ .family = AF_INET6 };
50 buf[cnt++] = (struct address){ .family = AF_INET, .addr = { 127,0,0,1 } };
52 buf[cnt++] = (struct address){ .family = AF_INET6, .addr = { [15] = 1 } };
54 return cnt;
87 int cnt = 0, badfam = 0, have_canon = 0;
91 while (i < FIXED_HOSTS_MAX_LENGTH && get_hosts_str(line, sizeof line, f, &i) && cnt < MAXADDRS) {
102 switch (name_from_numeric(buf+cnt, line, family)) {
104 cnt++;
127 return cnt ? cnt : badfam;
133 int cnt;
158 if (ctx->cnt >= MAXADDRS) return 0;
170 ctx->addrs[ctx->cnt].family = family;
171 ctx->addrs[ctx->cnt].scopeid = 0;
172 memcpy(ctx->addrs[ctx->cnt++].addr, data, len);
289 if (ctx.cnt) return ctx.cnt;
350 int cnt = name_from_dns(buf, canon, canon, family, &conf, netid);
351 if (cnt) return cnt;
436 int cnt = 0, i, j;
464 cnt = name_from_null(buf, name, family, flags);
465 if (!cnt) cnt = name_from_numeric(buf, name, family);
467 if (!cnt && (flags & AI_NUMERICHOST)) {
471 if (!cnt && !(flags & AI_NUMERICHOST)) {
472 cnt = predefined_host_name_from_hosts(buf, canon, name, family);
473 if (!cnt) cnt = name_from_hosts(buf, canon, name, family);
474 if (!cnt) cnt = name_from_dns_search(buf, canon, name, family, netid);
476 if (cnt<=0) return cnt ? cnt : EAI_NONAME;
482 for (i=0; i<cnt && buf[i].family != AF_INET6; i++);
483 if (i<cnt) {
484 for (j=0; i<cnt; i++) {
488 cnt = i = j;
492 for (i=0; i<cnt; i++) {
502 if (cnt<2 || family==AF_INET) return cnt;
503 for (i=0; i<cnt; i++) if (buf[i].family != AF_INET) break;
504 if (i==cnt) return cnt;
514 for (i=0; i<cnt; i++) {
572 qsort(buf, cnt, sizeof *buf, addrcmp);
576 return cnt;
652 int cnt = linklist_size(host_ips_list_);
654 for (int i = cnt - 1; i >= 0; i--) {
727 int cnt = 0;
734 cnt++;
744 return cnt > 0 ? 0 : -1;
825 int cnt = 0;
829 while (pnode != NULL && cnt < MAXADDRS) {
832 if (__lookup_ipliteral(buf+cnt, pinfo->ip, family) == 1) {
833 cnt++;
840 if (cnt > 0) {
843 return cnt;