/illumos-gate/usr/src/lib/lib9p/common/ |
H A D | rfuncs.c | 66 const char *endp, *comp; in r_basename() local 84 endp = path + strlen(path) - 1; in r_basename() 85 while (*endp == '/' && endp > path) in r_basename() 86 endp--; in r_basename() 88 if (*endp == '/') { in r_basename() 117 comp = endp; in r_basename() 120 len = (size_t)(endp - comp + 1); in r_basename() 161 const char *endp, *dirpart; in r_dirname() local 195 endp = path + strlen(path) - 1; in r_dirname() 196 while (endp > path && *endp == '/') in r_dirname() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/ |
H A D | snoop_http.c | 58 static int printable(const char *line, const char *endp); 63 char *p, *q, *endp; in interpret_http() local 67 endp = line + fraglen; in interpret_http() 70 c = printable(line, endp - 1); in interpret_http() 85 for (p = line; p < endp && lineno < NLINES; p = q + 1) { in interpret_http() 86 c = printable(p, endp - 1); in interpret_http() 97 q = memchr(p, CR, (endp - p)); in interpret_http() 99 if (q < endp - 1 && q[1] == LF) in interpret_http() 102 q = memchr(p, LF, (endp - p)); in interpret_http() 105 q = endp - 1; in interpret_http() [all …]
|
/illumos-gate/usr/src/lib/libresolv2/common/resolv/ |
H A D | res_mkupdate.c | 80 u_char *cp, *sp2, *startp, *endp; in res_nmkupdate() local 203 endp = startp + rrecp->r_size - 1; in res_nmkupdate() 207 if (!getword_str(buf2, sizeof buf2, &startp, endp)) in res_nmkupdate() 222 if (!getword_str(buf2, sizeof buf2, &startp, endp)) in res_nmkupdate() 235 endp)) in res_nmkupdate() 255 soanum = getnum_str(&startp, endp); in res_nmkupdate() 271 n = getnum_str(&startp, endp); in res_nmkupdate() 276 if (!getword_str(buf2, sizeof buf2, &startp, endp)) in res_nmkupdate() 285 n = getnum_str(&startp, endp); in res_nmkupdate() 291 n = getnum_str(&startp, endp); in res_nmkupdate() [all …]
|
/illumos-gate/usr/src/lib/libgss/ |
H A D | g_initialize.c | 714 char buffer[BUFSIZ], *oidStr, *oid, *sharedLib, *kernMod, *endp; local 757 for (endp = oid; *endp && !isspace(*endp); endp++) 760 if (*endp) { 761 *endp = '\0'; 786 for (sharedLib = endp+1; *sharedLib && isspace(*sharedLib); 803 for (endp = sharedLib; *endp && !isspace(*endp); endp++) 806 if (*endp) { 807 *endp = '\0'; 811 for (kernMod = endp+1; *kernMod && isspace(*kernMod); 825 for (endp = kernMod; *endp && !isspace(*endp); endp++) [all …]
|
/illumos-gate/usr/src/uts/common/inet/ip/ |
H A D | ipcsum.c | 74 uint8_t *endp = mp->b_wptr; local 90 if ((endp - startp) < 10) { 92 while ((endp - startp) >= 2) { 97 if ((endp - startp) >= 1) { 117 if ((uint32_t)endp & 0x1) { 120 endp--; 121 sum += NEXT_ONE(endp); 123 if ((uint32_t)endp & 0x2) { 125 endp -= 2; 126 sum += NEXT_TWO(endp); [all …]
|
/illumos-gate/usr/src/lib/libc/port/inet/ |
H A D | inet_pton.c | 140 uchar_t tmp[IN6ADDRSZ], *tp, *endp, *colonp; in inet_pton6() local 146 endp = tp + IN6ADDRSZ; in inet_pton6() 178 if (tp + INT16SZ > endp) in inet_pton6() 186 if (ch == '.' && ((tp + INADDRSZ) <= endp) && in inet_pton6() 195 if (tp + INT16SZ > endp) in inet_pton6() 208 if (tp == endp) in inet_pton6() 211 endp[- i] = colonp[n - i]; in inet_pton6() 214 tp = endp; in inet_pton6() 216 if (tp != endp) in inet_pton6()
|
/illumos-gate/usr/src/cmd/dispadmin/ |
H A D | fssdispadmin.c | 66 char *endp; in main() local 92 res = strtoul(optarg, &endp, 10); in main() 93 if (res == 0 || errno != 0 || *endp != '\0') in main() 201 char *endp; in setadmin() local 228 i = (int)strtol(value, &endp, 10); in setadmin() 229 if (errno != 0 || endp == value || in setadmin() 230 i < 0 || *endp != '\0') in setadmin() 238 i = (int)strtol(value, &endp, 10); in setadmin() 239 if (errno != 0 || endp == value || in setadmin() 240 i < 0 || *endp != '\0') in setadmin()
|
H A D | fxdispadmin.c | 69 char *endp; in main() local 95 res = strtoul(optarg, &endp, 10); in main() 96 if (res == 0 || errno != 0 || *endp != '\0') in main() 231 char *endp; in set_fxdptbl() local 276 i = (int)strtol(value, &endp, 10); in set_fxdptbl() 277 if (errno != 0 || endp == value || in set_fxdptbl() 278 i < 0 || *endp != '\0') in set_fxdptbl()
|
/illumos-gate/usr/src/lib/libdwarf/common/ |
H A D | dwarf_dsc.c | 59 Dwarf_Small *endp = blockpointer + blocklen; in get_dsc_leb_entries() local 77 while (p < endp) { in get_dsc_leb_entries() 88 leblen,dbg,error,endp); in get_dsc_leb_entries() 91 leblen, dbg,error,endp); in get_dsc_leb_entries() 94 leblen, dbg,error,endp); in get_dsc_leb_entries() 96 leblen, dbg,error,endp); in get_dsc_leb_entries() 111 while (p < endp) { in get_dsc_leb_entries() 122 leblen,dbg,error,endp); in get_dsc_leb_entries() 125 leblen,dbg,error,endp); in get_dsc_leb_entries() 128 leblen,dbg,error,endp); in get_dsc_leb_entries() [all …]
|
/illumos-gate/usr/src/cmd/ypcmd/ |
H A D | stdhosts.c | 234 char *endp; /* Points to the NULL at the end */ in verify_and_output() local 258 if ((endp = strchr(value, '#')) == 0) /* Ignore # comments */ in verify_and_output() 259 endp = p + strlen(p); /* Or endp = EOL */ in verify_and_output() 266 while ((p < endp) && isspace((unsigned char)*p)) in verify_and_output() 269 if (p == endp) /* End of the string */ in verify_and_output() 284 while ((p < endp) && !isspace((unsigned char)*p)) in verify_and_output() 307 if (p < endp) in verify_and_output() 310 } while (p < endp); in verify_and_output()
|
/illumos-gate/usr/src/lib/libresolv2/common/inet/ |
H A D | inet_cidr_pton.c | 155 u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; in inet_cidr_pton_ipv6() local 162 endp = tp + NS_IN6ADDRSZ; in inet_cidr_pton_ipv6() 195 if (tp + NS_INT16SZ > endp) in inet_cidr_pton_ipv6() 203 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && in inet_cidr_pton_ipv6() 218 if (tp + NS_INT16SZ > endp) in inet_cidr_pton_ipv6() 231 if (tp == endp) in inet_cidr_pton_ipv6() 234 endp[- i] = colonp[n - i]; in inet_cidr_pton_ipv6() 237 tp = endp; in inet_cidr_pton_ipv6()
|
H A D | inet_net_pton.c | 266 u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; in inet_net_pton_ipv6() local 277 endp = tp + NS_IN6ADDRSZ; in inet_net_pton_ipv6() 311 if (tp + NS_INT16SZ > endp) in inet_net_pton_ipv6() 320 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && in inet_net_pton_ipv6() 332 if (tp + NS_INT16SZ > endp) in inet_net_pton_ipv6() 345 endp = tmp + 2 * words; in inet_net_pton_ipv6() 355 if (tp == endp) in inet_net_pton_ipv6() 358 endp[- i] = colonp[n - i]; in inet_net_pton_ipv6() 361 tp = endp; in inet_net_pton_ipv6() 363 if (tp != endp) in inet_net_pton_ipv6()
|
/illumos-gate/usr/src/lib/libdladm/common/ |
H A D | flowattr.c | 82 char *prefix_str, *endp = NULL; in do_check_ip_addr() local 93 prefix_len = (int)strtol(prefix_str, &endp, 10); in do_check_ip_addr() 94 if (errno != 0 || prefix_len == 0 || *endp != '\0') in do_check_ip_addr() 172 char *endp = NULL; in do_check_port() local 175 val = strtol(attr_val, &endp, 10); in do_check_port() 176 if (val < 1 || val > MAX_PORT || *endp != '\0') in do_check_port() 295 char *mask_str, *endp = NULL; in do_check_dsfield() local 301 mask = strtoul(mask_str, &endp, 16); in do_check_dsfield() 303 *endp != '\0') in do_check_dsfield() 307 endp = NULL; in do_check_dsfield() [all …]
|
H A D | libdladm.c | 512 char *endp = NULL; in dladm_str2interval() local 515 val = strtol(oarg, &endp, 10); in dladm_str2interval() 516 if (errno != 0 || val <= 0 || *endp != '\0') in dladm_str2interval() 527 char *endp = NULL; in dladm_str2bw() local 533 sn = strtoull(oarg, &endp, 10); in dladm_str2bw() 535 if ((errno != 0) || (strlen(endp) > 1)) in dladm_str2bw() 542 switch (*endp) { in dladm_str2bw() 1126 char *endp; in dladm_strs2range() local 1147 strtol(prop_val[i], &endp, 10); in dladm_strs2range() 1148 if ((endp != NULL) && (*endp != '\0')) { in dladm_strs2range() [all …]
|
/illumos-gate/usr/src/lib/fm/libdiagcode/common/ |
H A D | diagcode_test.c | 199 char *endp; in do_key2code() local 216 if ((endp = strchr(beginp, ' ')) != NULL) { in do_key2code() 217 *endp++ = '\0'; in do_key2code() 218 beginp = endp; in do_key2code() 353 char *endp; in testdict() local 359 if ((endp = strchr(linebuf, '\n')) != NULL) in testdict() 360 *endp = '\0'; in testdict() 365 if ((endp = strchr(beginp, ':')) != NULL) { in testdict() 366 *endp++ = '\0'; in testdict() 367 beginp = endp; in testdict()
|
/illumos-gate/usr/src/uts/common/rpc/ |
H A D | clnt_clts.c | 1326 check_endpnt(struct endpnt *endp, struct endpnt **newp) in check_endpnt() argument 1328 *newp = endp; in check_endpnt() 1330 mutex_enter(&endp->e_lock); in check_endpnt() 1331 ASSERT(endp->e_ref >= 1); in check_endpnt() 1341 if ((endp->e_flags & ENDPNT_ESTABLISHED) && in check_endpnt() 1342 (!(endp->e_flags & ENDPNT_BOUND) || in check_endpnt() 1343 (endp->e_flags & ENDPNT_STALE))) { in check_endpnt() 1350 endp->e_flags &= ~(ENDPNT_ESTABLISHED | in check_endpnt() 1352 mutex_exit(&endp->e_lock); in check_endpnt() 1362 while (!(endp->e_flags & ENDPNT_BOUND) && in check_endpnt() [all …]
|
/illumos-gate/usr/src/lib/smbsrv/libsmb/common/ |
H A D | smb_ctxbuf.c | 61 ctx->endp = &buf[buflen]; in smb_ctxbuf_init() 79 ctx->curp == 0 || ctx->endp == 0) in smb_ctxbuf_len() 105 ctx->curp == 0 || ctx->endp == 0) in smb_ctxbuf_printf() 110 n = vsnprintf((char *)ctx->curp, ctx->endp-ctx->curp, fmt, args); in smb_ctxbuf_printf()
|
H A D | smb_syslog.c | 55 const char *endp = buf + buflen - 1; in smb_syslog_fmt_m() local 57 while ((*bp = *sp) != '\0' && bp != endp) { in smb_syslog_fmt_m() 60 if (strerror_r(err, bp, endp - bp) == 0) in smb_syslog_fmt_m()
|
/illumos-gate/usr/src/lib/libc/port/regex/ |
H A D | engine.c | 88 const char *endp; /* end of string -- virtual NUL here */ member 188 const char *endp; in matcher() local 273 m->endp = stop; in matcher() 295 endp = walk(m, start, stop, gf, gl, true); in matcher() 296 if (endp == NULL) { /* a miss */ in matcher() 311 endp = walk(m, m->coldp, stop, gf, gl, false); in matcher() 312 if (endp != NULL) in matcher() 314 assert(m->coldp < m->endp); in matcher() 316 m->endp - m->coldp, &m->mbs, 0); in matcher() 333 dp = dissect(m, m->coldp, endp, gf, gl); in matcher() [all …]
|
/illumos-gate/usr/src/lib/libfakekernel/common/ |
H A D | kmisc.c | 96 ddi_strtoul(const char *str, char **endp, int base, unsigned long *res) in ddi_strtoul() argument 99 *res = strtoul(str, endp, base); in ddi_strtoul() 106 ddi_strtoull(const char *str, char **endp, int base, u_longlong_t *res) in ddi_strtoull() argument 109 *res = strtoull(str, endp, base); in ddi_strtoull()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppd/ |
H A D | multilink.c | 196 char *p, *endp; local 202 i = strtol(p, &endp, 10); 203 if (endp != p && (*endp == 0 || *endp == ';')) { 331 char *p, *endp; local 342 i = strtol(str, &endp, 10); 343 if (endp == str) { 348 str = endp;
|
/illumos-gate/usr/src/uts/common/cpr/ |
H A D | cpr_stat.c | 274 cpr_time_t *startp, *shdnp, *endp; in cpr_convert_promtime() local 278 endp = &cpr_term.tm_cprboot_end; in cpr_convert_promtime() 280 cb_time = endp->tv_sec - startp->tv_sec; in cpr_convert_promtime() 282 cpr_tod_get(endp); in cpr_convert_promtime() 283 startp->tv_sec = endp->tv_sec - cb_time; in cpr_convert_promtime() 286 min_promtime > (endp->tv_sec - shdnp->tv_sec - cb_time)) in cpr_convert_promtime() 287 min_promtime = endp->tv_sec - shdnp->tv_sec - cb_time; in cpr_convert_promtime()
|
/illumos-gate/usr/src/cmd/logger/ |
H A D | logger.c | 133 char *p, *endp; in main() local 231 endp = buf + buflen; in main() 233 while (fgets(p, endp - p, stdin) != NULL) { in main() 244 } else if (len < endp - p - 1) { in main() 262 endp - p, len, offset, buflen); in main() 269 endp = buf + buflen; in main()
|
/illumos-gate/usr/src/cmd/vrrpadm/ |
H A D | vrrpadm.c | 180 char *endp; in do_create() local 210 conf.vvc_adver_int = (uint32_t)strtol(optarg, &endp, 0); in do_create() 211 if ((*endp) != '\0' || in do_create() 223 conf.vvc_pri = strtol(optarg, &endp, 0); in do_create() 224 if ((*endp) != '\0' || conf.vvc_pri < VRRP_PRI_MIN || in do_create() 246 conf.vvc_vrid = strtol(optarg, &endp, 0); in do_create() 247 if ((*endp) != '\0' || conf.vvc_vrid < VRRP_VRID_MIN || in do_create() 341 char *endp; in do_modify() local 351 conf.vvc_adver_int = (uint32_t)strtol(optarg, &endp, 0); in do_modify() 352 if ((*endp) != '\0' || in do_modify() [all …]
|
/illumos-gate/usr/src/lib/pam_modules/unix_cred/ |
H A D | unix_cred.c | 96 const char *q, *endp; in getset() local 97 tmp = priv_str_to_set(str, ",", &endp); in getset() 99 if (endp == NULL) in getset() 103 q = strchr(endp, ','); in getset() 105 q = endp + strlen(endp); in getset() 111 (void) strncat(badp, endp, q - endp); in getset() 113 (void) memmove((void *)endp, q, strlen(q) + 1); in getset()
|