| /netbsd-src/external/gpl2/xcvs/dist/lib/ |
| H A D | xreadlink.c | 64 size_t buf_size = size < MAXSIZE ? size + 1 : MAXSIZE; in xreadlink() local 68 char *buffer = xmalloc (buf_size); in xreadlink() 69 ssize_t r = readlink (file, buffer, buf_size); in xreadlink() 82 if (link_length < buf_size) in xreadlink() 89 if (buf_size <= MAXSIZE / 2) in xreadlink() 90 buf_size *= 2; in xreadlink() 91 else if (buf_size < MAXSIZE) in xreadlink() 92 buf_size = MAXSIZE; in xreadlink()
|
| /netbsd-src/external/gpl2/gettext/dist/gettext-tools/gnulib-lib/ |
| H A D | xreadlink.c | 70 size_t buf_size = sizeof (initial_buf); in xreadlink() local 75 ssize_t link_length = readlink (filename, buffer, buf_size); in xreadlink() 88 if ((size_t) link_length < buf_size) in xreadlink() 105 if ((size_t) link_length < buf_size) in xreadlink() 118 buf_size *= 2; in xreadlink() 119 if (SSIZE_MAX < buf_size || (SIZE_MAX / 2 < SSIZE_MAX && buf_size == 0)) in xreadlink() 125 buffer = (char *) xmalloc (buf_size); in xreadlink()
|
| /netbsd-src/external/gpl2/gettext/dist/gnulib-local/lib/ |
| H A D | xreadlink.c | 70 size_t buf_size = sizeof (initial_buf); in xreadlink() local 75 ssize_t link_length = readlink (filename, buffer, buf_size); in xreadlink() 88 if ((size_t) link_length < buf_size) in xreadlink() 105 if ((size_t) link_length < buf_size) in xreadlink() 118 buf_size *= 2; in xreadlink() 119 if (SSIZE_MAX < buf_size || (SIZE_MAX / 2 < SSIZE_MAX && buf_size == 0)) in xreadlink() 125 buffer = (char *) xmalloc (buf_size); in xreadlink()
|
| /netbsd-src/external/gpl2/gettext/dist/gettext-runtime/gnulib-lib/ |
| H A D | xreadlink.c | 70 size_t buf_size = sizeof (initial_buf); in xreadlink() local 75 ssize_t link_length = readlink (filename, buffer, buf_size); in xreadlink() 88 if ((size_t) link_length < buf_size) in xreadlink() 105 if ((size_t) link_length < buf_size) in xreadlink() 118 buf_size *= 2; in xreadlink() 119 if (SSIZE_MAX < buf_size || (SIZE_MAX / 2 < SSIZE_MAX && buf_size == 0)) in xreadlink() 125 buffer = (char *) xmalloc (buf_size); in xreadlink()
|
| /netbsd-src/sys/compat/sys/ |
| H A D | event.h | 72 const size_t buf_size = sizeof(*buf) * n; in compat_100___kevent50_fetch_changes() local 77 buf = kmem_alloc(buf_size, KM_SLEEP); in compat_100___kevent50_fetch_changes() 79 error = copyin(changelist100 + index, buf, buf_size); in compat_100___kevent50_fetch_changes() 87 kmem_free(buf, buf_size); in compat_100___kevent50_fetch_changes() 97 const size_t buf_size = sizeof(*buf) * n; in compat_100___kevent50_put_events() local 102 buf = kmem_alloc(buf_size, KM_SLEEP); in compat_100___kevent50_put_events() 107 error = copyout(buf, eventlist100 + index, buf_size); in compat_100___kevent50_put_events() 109 kmem_free(buf, buf_size); in compat_100___kevent50_put_events()
|
| /netbsd-src/external/lgpl3/mpfr/dist/src/ |
| H A D | fpif.c | 531 size_t used_size, buf_size; in mpfr_fpif_export() local 536 buf_size = MAX_VARIABLE_STORAGE(sizeof(mpfr_exp_t), mpfr_get_prec (x)); in mpfr_fpif_export() 537 buf = (unsigned char*) mpfr_allocate_func (buf_size); in mpfr_fpif_export() 540 used_size = buf_size; in mpfr_fpif_export() 542 used_size > buf_size ? buf_size = used_size : 0; in mpfr_fpif_export() 546 mpfr_free_func (buf, buf_size); in mpfr_fpif_export() 549 used_size = buf_size; in mpfr_fpif_export() 554 used_size > buf_size ? buf_size = used_size : 0; in mpfr_fpif_export() 558 mpfr_free_func (buf, buf_size); in mpfr_fpif_export() 564 used_size = buf_size; in mpfr_fpif_export() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/err/ |
| H A D | err_blocks.c | 53 size_t buf_size = 0; in ERR_vset_error() local 67 buf_size = es->err_data_size[i]; in ERR_vset_error() 83 if (buf_size < ERR_MAX_DATA_SIZE in ERR_vset_error() 86 buf_size = ERR_MAX_DATA_SIZE; in ERR_vset_error() 90 printed_len = BIO_vsnprintf(buf, buf_size, fmt, args); in ERR_vset_error() 105 buf_size = printed_len + 1; in ERR_vset_error() 116 err_set_data(es, es->top, buf, buf_size, flags); in ERR_vset_error()
|
| /netbsd-src/lib/libisns/ |
| H A D | isns_pdu.c | 77 int buf_size; member 120 isns_lookup_buffer_list(int buf_size) in isns_lookup_buffer_list() argument 130 if (list_p->buf_size == buf_size) in isns_lookup_buffer_list() 146 isns_add_buffer_pool(int buf_size, int count) in isns_add_buffer_pool() argument 152 DBG("isns_add_buffer_pool: buf_size=%d, count=%d\n", buf_size, count); in isns_add_buffer_pool() 157 buf_size = (buf_size + 0x03) & ~0x03; in isns_add_buffer_pool() 164 list_p = isns_lookup_buffer_list(buf_size); in isns_add_buffer_pool() 173 list_p->buf_size = buf_size; in isns_add_buffer_pool() 184 } else if (G_buffer_pool.list_p->buf_size > buf_size) { in isns_add_buffer_pool() 191 if (p_next->buf_size > buf_size) { in isns_add_buffer_pool() [all …]
|
| /netbsd-src/sys/lib/libsa/ |
| H A D | minixfs3.c | 402 size_t buf_size; in search_directory() local 409 rc = buf_read_file(f, (void *)&dbuf, &buf_size); in search_directory() 412 if (buf_size == 0) in search_directory() 420 if (buf_size < fs->mfs_block_size) in search_directory() 421 buf_size = fs->mfs_block_size; in search_directory() 441 fp->f_seekp += buf_size; in search_directory() 450 size_t buf_size; in read_sblock() local 460 SUPER_BLOCK_OFF / GETSECSIZE(f), MINBSIZE, sbbuf, &buf_size); in read_sblock() 464 if (buf_size != MINBSIZE) in read_sblock() 648 size_t buf_size; in minixfs3_open() local [all …]
|
| H A D | ufs.c | 598 size_t buf_size; in search_directory() local 604 rc = buf_read_file(f, &buf, &buf_size); in search_directory() 609 edp = (struct direct *)(buf + buf_size); in search_directory() 629 fp->f_seekp += buf_size; in search_directory() 639 size_t buf_size; in ffs_find_superblock() local 648 sblock_try[i] / GETSECSIZE(f), SBLOCKSIZE, fs, &buf_size); in ffs_find_superblock() 651 if (buf_size != SBLOCKSIZE) in ffs_find_superblock() 663 SBLOCKOFFSET / GETSECSIZE(f), SBLOCKSIZE, fs, &buf_size); in ffs_find_superblock() 666 if (buf_size != SBLOCKSIZE) in ffs_find_superblock() 841 size_t buf_size; in ufs_open() local [all …]
|
| H A D | ext2fs.c | 379 size_t buf_size; in search_directory() local 386 rc = buf_read_file(f, &buf, &buf_size); in search_directory() 391 edp = (struct ext2fs_direct *)(buf + buf_size); in search_directory() 406 fp->f_seekp += buf_size; in search_directory() 416 size_t buf_size; in read_sblock() local 420 SBOFF / GETSECSIZE(f), SBSIZE, sbbuf, &buf_size); in read_sblock() 424 if (buf_size != SBSIZE) in read_sblock() 638 size_t buf_size; in ext2fs_open() local 649 fs->e2fs_bsize, buf, &buf_size); in ext2fs_open() 728 size_t buf_size; in ext2fs_read() local [all …]
|
| H A D | cd9660.c | 141 size_t buf_size, nread, psize, dsize; in cd9660_open() local 149 buf_size = ISO_DEFAULT_BLOCK_SIZE; in cd9660_open() 150 buf = alloc(buf_size); in cd9660_open() 181 buf = alloc(buf_size = roundup(psize, ISO_DEFAULT_BLOCK_SIZE)); in cd9660_open() 188 buf_size, buf, &nread); in cd9660_open() 191 if (nread != buf_size) { in cd9660_open() 283 dealloc(buf, buf_size); in cd9660_open() 291 dealloc(buf, buf_size); in cd9660_open()
|
| /netbsd-src/sys/external/bsd/common/include/linux/ |
| H A D | printk.h | 73 hex_dump_to_buffer(const void *buf, size_t buf_size, int bytes_per_line, in hex_dump_to_buffer() argument 86 while (i < buf_size) { in hex_dump_to_buffer() 92 if ((i == buf_size) || (0 == (i % bytes_per_line))) in hex_dump_to_buffer() 109 int bytes_per_line, int bytes_per_group, const void *buf, size_t buf_size, in print_hex_dump() argument 121 while (0 < buf_size) { in print_hex_dump() 122 const size_t n = MIN(buf_size, 32); in print_hex_dump() 145 buf_size -= n; in print_hex_dump()
|
| /netbsd-src/crypto/external/bsd/heimdal/dist/lib/krb5/ |
| H A D | build_auth.c | 47 size_t buf_size; in make_etypelist() local 55 ASN1_MALLOC_ENCODE(EtypeList, buf, buf_size, &etypes, &len, ret); in make_etypelist() 60 if(buf_size != len) in make_etypelist() 74 ASN1_MALLOC_ENCODE(AD_IF_RELEVANT, buf, buf_size, &ad, &len, ret); in make_etypelist() 79 if(buf_size != len) in make_etypelist() 114 size_t buf_size; in _krb5_build_authenticator() local 176 ASN1_MALLOC_ENCODE(Authenticator, buf, buf_size, &auth, &len, ret); in _krb5_build_authenticator() 179 if(buf_size != len) in _krb5_build_authenticator()
|
| H A D | mk_priv.c | 49 size_t buf_size; in krb5_mk_priv() local 100 ASN1_MALLOC_ENCODE(EncKrbPrivPart, buf, buf_size, &part, &len, ret); in krb5_mk_priv() 103 if (buf_size != len) in krb5_mk_priv() 119 buf + buf_size - len, in krb5_mk_priv() 130 ASN1_MALLOC_ENCODE(KRB_PRIV, buf, buf_size, &s, &len, ret); in krb5_mk_priv() 133 if (buf_size != len) in krb5_mk_priv() 138 ret = krb5_data_copy(outbuf, buf + buf_size - len, len); in krb5_mk_priv()
|
| H A D | mk_safe.c | 48 size_t buf_size; in krb5_mk_safe() local 104 ASN1_MALLOC_ENCODE(KRB_SAFE, buf, buf_size, &s, &len, ret); in krb5_mk_safe() 107 if(buf_size != len) in krb5_mk_safe() 128 ASN1_MALLOC_ENCODE(KRB_SAFE, buf, buf_size, &s, &len, ret); in krb5_mk_safe() 132 if(buf_size != len) in krb5_mk_safe()
|
| H A D | mk_rep.c | 47 size_t buf_size; in krb5_mk_rep() local 93 ASN1_MALLOC_ENCODE(EncAPRepPart, buf, buf_size, &body, &len, ret); in krb5_mk_rep() 97 if (buf_size != len) in krb5_mk_rep() 108 buf + buf_size - len, in krb5_mk_rep()
|
| /netbsd-src/usr.bin/sort/ |
| H A D | files.c | 177 static size_t buf_size = DEFLLEN; in seq() local 184 buf = malloc(buf_size); in seq() 187 buf_size); in seq() 190 end = buf + buf_size; in seq() 201 buf_size *= 2; in seq() 203 new_buf = realloc(buf, buf_size); in seq() 206 buf_size); in seq() 208 end = new_buf + buf_size; in seq()
|
| /netbsd-src/external/gpl2/gettext/dist/gettext-tools/libgrep/ |
| H A D | m-fgrep.c | 71 Fexecute (const void *compiled_pattern, const char *buf, size_t buf_size, in Fexecute() argument 82 mb_properties = check_multibyte_string (buf, buf_size); in Fexecute() 85 for (beg = buf; beg <= buf + buf_size; ++beg) in Fexecute() 88 kwsexec (ckwset->kwset, beg, buf + buf_size - beg, &kwsmatch); in Fexecute() 116 if (beg + len < buf + buf_size && beg[len] != eol) in Fexecute() 125 if (try + len < buf + buf_size in Fexecute() 154 end = memchr (beg + len, eol, (buf + buf_size) - (beg + len)); in Fexecute()
|
| H A D | m-common.c | 74 check_multibyte_string (const char *buf, size_t buf_size) in check_multibyte_string() argument 76 char *mb_properties = (char *) malloc (buf_size); in check_multibyte_string() 81 memset (mb_properties, 0, sizeof (char) * buf_size); in check_multibyte_string() 82 for (i = 0; i < buf_size ;) in check_multibyte_string() 85 mbclen = mbrlen (buf + i, buf_size - i, &cur_state); in check_multibyte_string()
|
| /netbsd-src/crypto/external/cpl/trousers/dist/src/tcsd/ |
| H A D | tcsd_threads.c | 214 data->comm.buf_size = TCSD_INIT_TXBUF_SIZE; in tcsd_thread_run() 215 data->comm.buf = calloc(1, data->comm.buf_size); in tcsd_thread_run() 233 data->comm.buf_size, recd_so_far); in tcsd_thread_run() 235 empty_space = data->comm.buf_size - recd_so_far; in tcsd_thread_run() 240 while (total_recv_size > (int) data->comm.buf_size) { in tcsd_thread_run() 244 if ((int)data->comm.buf_size + TCSD_INCR_TXBUF_SIZE < total_recv_size) { in tcsd_thread_run() 245 new_bufsize = data->comm.buf_size + TCSD_INCR_TXBUF_SIZE; in tcsd_thread_run() 260 data->comm.buf_size = new_bufsize; in tcsd_thread_run() 306 memset(data->comm.buf, 0, data->comm.buf_size); in tcsd_thread_run() 333 data->comm.buf_size = -1; in tcsd_thread_run()
|
| /netbsd-src/usr.sbin/intrctl/ |
| H A D | intrctl_io.c | 48 size_t buf_size; in intrctl_io_alloc() local 52 error = sysctlbyname("kern.intr.list", NULL, &buf_size, NULL, 0); in intrctl_io_alloc() 57 buf = malloc(buf_size); in intrctl_io_alloc() 63 error = sysctlbyname("kern.intr.list", buf, &buf_size, NULL, 0); in intrctl_io_alloc() 69 temp = realloc(buf, buf_size); in intrctl_io_alloc()
|
| /netbsd-src/crypto/external/bsd/openssl/dist/apps/ |
| H A D | passwd.c | 513 size_t buf_size = 0; in shacrypt() local 537 buf_size = 32; in shacrypt() 541 buf_size = 64; in shacrypt() 623 for (n = passwd_len; n > buf_size; n -= buf_size) { in shacrypt() 624 if (!EVP_DigestUpdate(md, buf, buf_size)) in shacrypt() 634 (n & 1) ? buf_size : passwd_len)) in shacrypt() 654 for (cp = p_bytes, n = passwd_len; n > buf_size; n -= buf_size, cp += buf_size) in shacrypt() 655 memcpy(cp, temp_buf, buf_size); in shacrypt() 671 for (cp = s_bytes, n = salt_len; n > buf_size; n -= buf_size, cp += buf_size) in shacrypt() 672 memcpy(cp, temp_buf, buf_size); in shacrypt() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/apps/ |
| H A D | passwd.c | 510 size_t buf_size = 0; in shacrypt() local 534 buf_size = 32; in shacrypt() 538 buf_size = 64; in shacrypt() 620 for (n = passwd_len; n > buf_size; n -= buf_size) { in shacrypt() 621 if (!EVP_DigestUpdate(md, buf, buf_size)) in shacrypt() 631 (n & 1) ? buf_size : passwd_len)) in shacrypt() 651 for (cp = p_bytes, n = passwd_len; n > buf_size; n -= buf_size, cp += buf_size) in shacrypt() 652 memcpy(cp, temp_buf, buf_size); in shacrypt() 668 for (cp = s_bytes, n = salt_len; n > buf_size; n -= buf_size, cp += buf_size) in shacrypt() 669 memcpy(cp, temp_buf, buf_size); in shacrypt() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/http/ |
| H A D | http_client.c | 46 int buf_size; /* Buffer size */ member 90 OSSL_HTTP_REQ_CTX *OSSL_HTTP_REQ_CTX_new(BIO *wbio, BIO *rbio, int buf_size) in OSSL_HTTP_REQ_CTX_new() argument 102 rctx->buf_size = buf_size > 0 ? buf_size : OSSL_HTTP_DEFAULT_MAX_LINE_LEN; in OSSL_HTTP_REQ_CTX_new() 103 rctx->buf = OPENSSL_malloc(rctx->buf_size); in OSSL_HTTP_REQ_CTX_new() 376 int buf_size, int overall_timeout) in http_req_ctx_new() argument 378 OSSL_HTTP_REQ_CTX *rctx = OSSL_HTTP_REQ_CTX_new(wbio, rbio, buf_size); in http_req_ctx_new() 546 n = BIO_read(rctx->rbio, rctx->buf, rctx->buf_size); in OSSL_HTTP_REQ_CTX_nbio() 549 n = BIO_gets(rctx->rbio, buf, rctx->buf_size); in OSSL_HTTP_REQ_CTX_nbio() 552 n = BIO_get_line(rctx->rbio, buf, rctx->buf_size); in OSSL_HTTP_REQ_CTX_nbio() 606 n = BIO_read(rctx->req, rctx->buf, rctx->buf_size); in OSSL_HTTP_REQ_CTX_nbio() [all …]
|