| /freebsd-12.1/contrib/apr/file_io/unix/ |
| H A D | readwrite.c | 79 if (*nbytes) { in file_read_buffered() 90 if (*nbytes <= 0) { in apr_file_read() 91 *nbytes = 0; in apr_file_read() 107 (*nbytes)--; in apr_file_read() 140 *nbytes += rv; in apr_file_read() 218 (*nbytes) = 0; in apr_file_write() 221 *nbytes = rv; in apr_file_write() 256 *nbytes = 0; in apr_file_writev() 260 *nbytes = bytes; in apr_file_writev() 404 apr_size_t nbytes; local [all …]
|
| /freebsd-12.1/sys/dev/bhnd/nvram/ |
| H A D | bhnd_nvram_iores.c | 197 *nbytes = 0; in bhnd_nvram_iores_validate_req() 206 *nbytes = ummin(*nbytes, iores->size - offset); in bhnd_nvram_iores_validate_req() 216 size_t nbytes) in bhnd_nvram_iores_read() argument 227 navail = nbytes; in bhnd_nvram_iores_read() 236 if (nbytes == 0) in bhnd_nvram_iores_read() 244 nbytes); in bhnd_nvram_iores_read() 248 nbytes / 2); in bhnd_nvram_iores_read() 252 nbytes / 4); in bhnd_nvram_iores_read() 274 navail = nbytes; in bhnd_nvram_iores_write() 287 nbytes); in bhnd_nvram_iores_write() [all …]
|
| H A D | bhnd_nvram_value_prf.c | 218 size_t limit, nbytes; in bhnd_nvram_val_vprintf() local 224 nbytes = 0; in bhnd_nvram_val_vprintf() 231 if (limit > nbytes) \ in bhnd_nvram_val_vprintf() 236 nbytes++; \ in bhnd_nvram_val_vprintf() 548 if (limit > nbytes) in bhnd_nvram_val_vprintf() 754 if (limit > nbytes && limit - nbytes >= slen) in bhnd_nvram_val_vprintf() 761 nbytes += arg_size; in bhnd_nvram_val_vprintf() 867 if (limit > nbytes) in bhnd_nvram_val_vprintf() 871 nbytes++; in bhnd_nvram_val_vprintf() 876 *olen = nbytes; in bhnd_nvram_val_vprintf() [all …]
|
| H A D | bhnd_nvram_ioptr.c | 141 size_t nbytes, size_t *navail) in bhnd_nvram_ioptr_ptr() argument 150 if (avail < nbytes) in bhnd_nvram_ioptr_ptr() 164 const void **ptr, size_t nbytes, size_t *navail) in bhnd_nvram_ioptr_read_ptr() argument 173 error = bhnd_nvram_ioptr_ptr(ioptr, offset, &writep, nbytes, navail); in bhnd_nvram_ioptr_read_ptr() 184 void **ptr, size_t nbytes, size_t *navail) in bhnd_nvram_ioptr_write_ptr() argument 195 return (bhnd_nvram_ioptr_ptr(ioptr, offset, ptr, nbytes, navail)); in bhnd_nvram_ioptr_write_ptr() 200 size_t nbytes) in bhnd_nvram_ioptr_read() argument 206 if ((error = bhnd_nvram_io_read_ptr(io, offset, &ptr, nbytes, NULL))) in bhnd_nvram_ioptr_read() 210 memcpy(buffer, ptr, nbytes); in bhnd_nvram_ioptr_read() 216 void *buffer, size_t nbytes) in bhnd_nvram_ioptr_write() argument [all …]
|
| H A D | bhnd_nvram_value.c | 683 nbytes = 0; in bhnd_nvram_val_encode_null() 689 nbytes = 0; in bhnd_nvram_val_encode_null() 697 *olen = nbytes; in bhnd_nvram_val_encode_null() 745 nbytes = 0; in bhnd_nvram_val_encode_bool() 775 *olen = nbytes; in bhnd_nvram_val_encode_bool() 840 nbytes = 0; in bhnd_nvram_val_encode_string() 875 nbytes++; in bhnd_nvram_val_encode_string() 963 nbytes++; in bhnd_nvram_val_encode_string() 1304 *olen = nbytes; in bhnd_nvram_val_encode_int() 1528 nbytes = 0; in bhnd_nvram_val_generic_encode() [all …]
|
| H A D | bhnd_nvram_subr.c | 733 if (nbytes == NULL) in bhnd_nvram_parse_int() 738 *nbytes = 0; in bhnd_nvram_parse_int() 747 for (; *nbytes < maxlen; (*nbytes)++) { in bhnd_nvram_parse_int() 753 if (*nbytes == maxlen) in bhnd_nvram_parse_int() 760 (*nbytes)++; in bhnd_nvram_parse_int() 763 (*nbytes)++; in bhnd_nvram_parse_int() 773 if (maxlen - *nbytes >= 2 && str[*nbytes] == '0' && in bhnd_nvram_parse_int() 774 (str[*nbytes+1] == 'x' || str[*nbytes+1] == 'X')) in bhnd_nvram_parse_int() 777 (*nbytes) += 2; in bhnd_nvram_parse_int() 865 for (; *nbytes < maxlen; (*nbytes)++) { in bhnd_nvram_parse_int() [all …]
|
| H A D | bhnd_nvram_io.c | 64 size_t nbytes) in bhnd_nvram_io_read() argument 66 return (io->iops->read(io, offset, buffer, nbytes)); in bhnd_nvram_io_read() 97 const void **ptr, size_t nbytes, size_t *navail) in bhnd_nvram_io_read_ptr() argument 99 return (io->iops->read_ptr(io, offset, ptr, nbytes, navail)); in bhnd_nvram_io_read_ptr() 121 size_t nbytes) in bhnd_nvram_io_write() argument 123 return (io->iops->write(io, offset, buffer, nbytes)); in bhnd_nvram_io_write() 155 size_t nbytes, size_t *navail) in bhnd_nvram_io_write_ptr() argument 157 return (io->iops->write_ptr(io, offset, ptr, nbytes, navail)); in bhnd_nvram_io_write_ptr()
|
| H A D | bhnd_nvram_iobuf.c | 258 size_t nbytes, size_t *navail) in bhnd_nvram_iobuf_ptr() argument 267 if (avail < nbytes) in bhnd_nvram_iobuf_ptr() 281 const void **ptr, size_t nbytes, size_t *navail) in bhnd_nvram_iobuf_read_ptr() argument 290 error = bhnd_nvram_iobuf_ptr(iobuf, offset, &ioptr, nbytes, navail); in bhnd_nvram_iobuf_read_ptr() 301 void **ptr, size_t nbytes, size_t *navail) in bhnd_nvram_iobuf_write_ptr() argument 308 return (bhnd_nvram_iobuf_ptr(iobuf, offset, ptr, nbytes, navail)); in bhnd_nvram_iobuf_write_ptr() 313 size_t nbytes) in bhnd_nvram_iobuf_read() argument 319 if ((error = bhnd_nvram_io_read_ptr(io, offset, &ptr, nbytes, NULL))) in bhnd_nvram_iobuf_read() 323 memcpy(buffer, ptr, nbytes); in bhnd_nvram_iobuf_read() 329 void *buffer, size_t nbytes) in bhnd_nvram_iobuf_write() argument [all …]
|
| H A D | bhnd_nvram_value_fmts.c | 428 nbytes = 0; in bhnd_nvram_val_bcm_leddc_encode_elem() 557 *olen = nbytes; in bhnd_nvram_val_bcm_leddc_encode_elem() 981 nbytes = 0; in bhnd_nvram_ident_num_string() 985 if (nbytes >= ilen) in bhnd_nvram_ident_num_string() 988 if (inp[nbytes] == '-' || inp[nbytes] == '+') in bhnd_nvram_ident_num_string() 989 nbytes++; in bhnd_nvram_ident_num_string() 998 if (ilen - nbytes >= 2 && inp[nbytes] == '0' && in bhnd_nvram_ident_num_string() 999 (inp[nbytes+1] == 'x' || inp[nbytes+1] == 'X')) in bhnd_nvram_ident_num_string() 1002 nbytes += 2; in bhnd_nvram_ident_num_string() 1020 for (; nbytes < ilen; nbytes++) { in bhnd_nvram_ident_num_string() [all …]
|
| /freebsd-12.1/contrib/file/src/ |
| H A D | encoding.c | 73 size_t nbytes = b->flen; in file_encoding() local 95 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding() 137 from_ebcdic(buf, nbytes, nbuf); in file_encoding() 250 for (i = 0; i < nbytes; i++) { in looks_ascii() 269 for (i = 0; i < nbytes; i++) { in looks_latin1() 289 for (i = 0; i < nbytes; i++) { in looks_extended() 323 for (i = 0; i < nbytes; i++) { in file_looks_utf8() 360 if (i >= nbytes) in file_looks_utf8() 419 if (nbytes < 2) in looks_ucs16() 431 for (i = 2; i + 1 < nbytes; i += 2) { in looks_ucs16() [all …]
|
| /freebsd-12.1/sys/kern/ |
| H A D | vfs_extattr.c | 199 cnt = nbytes; in extattr_set_vp() 227 size_t nbytes; member 263 size_t nbytes; member 280 size_t nbytes; member 362 cnt = nbytes; in extattr_get_vp() 394 size_t nbytes; member 430 size_t nbytes; member 446 size_t nbytes; member 652 cnt = nbytes; in extattr_list_vp() 683 size_t nbytes; member [all …]
|
| /freebsd-12.1/lib/libc/stdio/ |
| H A D | fmemopen.c | 171 if (nbytes > ck->len - ck->off) in fmemopen_read() 172 nbytes = ck->len - ck->off; in fmemopen_read() 174 if (nbytes == 0) in fmemopen_read() 177 memcpy(buf, ck->buf + ck->off, nbytes); in fmemopen_read() 179 ck->off += nbytes; in fmemopen_read() 181 return (nbytes); in fmemopen_read() 189 if (nbytes > ck->size - ck->off) in fmemopen_write() 190 nbytes = ck->size - ck->off; in fmemopen_write() 192 if (nbytes == 0) in fmemopen_write() 197 ck->off += nbytes; in fmemopen_write() [all …]
|
| H A D | xprintf_str.c | 62 size_t clen, nbytes; in __wcsconv() local 68 nbytes = wcsrtombs(NULL, (const wchar_t **)&p, 0, &mbs); in __wcsconv() 69 if (nbytes == (size_t)-1) in __wcsconv() 78 nbytes = prec; in __wcsconv() 80 nbytes = 0; in __wcsconv() 86 (int)(nbytes + clen) > prec) in __wcsconv() 88 nbytes += clen; in __wcsconv() 92 if ((convbuf = malloc(nbytes + 1)) == NULL) in __wcsconv() 98 if ((nbytes = wcsrtombs(convbuf, (const wchar_t **)&p, in __wcsconv() 99 nbytes, &mbs)) == (size_t)-1) { in __wcsconv() [all …]
|
| /freebsd-12.1/lib/libc/db/btree/ |
| H A D | bt_split.c | 191 if (n < nbytes) { in __bt_split() 195 nbytes = n; in __bt_split() 203 nbytes = NRINTERNAL; in __bt_split() 522 u_int32_t nbytes; in bt_broot() local 533 nbytes = NBINTERNAL(0); in bt_broot() 605 u_int32_t nbytes; in bt_psplit() local 621 nbytes = ilen; in bt_psplit() 632 nbytes = NBLEAF(bl); in bt_psplit() 728 nbytes = NBLEAF(bl); in bt_psplit() 732 nbytes = NRINTERNAL; in bt_psplit() [all …]
|
| /freebsd-12.1/crypto/openssl/engines/ |
| H A D | e_padlock.c | 345 if (nbytes == 0) in padlock_cfb_cipher() 353 nbytes -= chunk; in padlock_cfb_cipher() 356 if (nbytes) { in padlock_cfb_cipher() 368 while (nbytes) { in padlock_cfb_cipher() 377 while (nbytes) { in padlock_cfb_cipher() 407 chunk++, nbytes--; in padlock_ofb_cipher() 413 if (nbytes == 0) in padlock_ofb_cipher() 421 nbytes -= chunk; in padlock_ofb_cipher() 424 if (nbytes) { in padlock_ofb_cipher() 433 while (nbytes) { in padlock_ofb_cipher() [all …]
|
| /freebsd-12.1/bin/sh/ |
| H A D | memalloc.c | 58 ckmalloc(size_t nbytes) in ckmalloc() argument 63 p = malloc(nbytes); in ckmalloc() 79 p = realloc(p, nbytes); in ckrealloc() 137 stnewblock(int nbytes) in stnewblock() argument 142 if (nbytes < MINSIZE) in stnewblock() 143 nbytes = MINSIZE; in stnewblock() 159 stalloc(int nbytes) in stalloc() argument 163 nbytes = ALIGN(nbytes); in stalloc() 165 stnewblock(nbytes); in stalloc() 167 stacknxt += nbytes; in stalloc() [all …]
|
| /freebsd-12.1/usr.sbin/fdread/ |
| H A D | fdread.c | 182 for (nbytes = 0; nbytes < mediasize;) { in doread() 183 if (lseek(fd, nbytes, SEEK_SET) != nbytes) in doread() 193 nbytes += rv; in doread() 203 if (lseek(fd, nbytes, SEEK_SET) != nbytes) in doread() 207 nbytes += rv; in doread() 210 nbytes / 1024); in doread() 268 nbytes, in doread() 269 nbytes + secsize - 1); in doread() 271 nbytes += secsize; in doread() 283 nbytes += rv; in doread() [all …]
|
| /freebsd-12.1/lib/libsecureboot/openpgp/ |
| H A D | dearmor.c | 44 dearmor(char *pem, size_t nbytes, size_t *len) in dearmor() argument 61 memmove(cp, ep, nbytes - (size_t)(ep - pem)); in dearmor() 62 nbytes -= (size_t)(ep - cp); in dearmor() 63 pem[nbytes] = '\0'; in dearmor() 71 memmove(cp, ep, nbytes - (size_t)(ep - pem)); in dearmor() 72 nbytes -= (size_t)(ep - cp); in dearmor() 73 pem[nbytes] = '\0'; in dearmor() 75 if ((po = decode_pem(pem, nbytes, &npo))) { in dearmor() 80 if ((bp = BIO_new_mem_buf(pem, (int)nbytes))) { in dearmor() 81 long llen = (long)nbytes; in dearmor()
|
| /freebsd-12.1/sys/crypto/aesni/ |
| H A D | aesni_ccm.c | 209 if (nbytes == 0 && abytes == 0) in AES_CCM_encrypt() 229 KASSERT(nbytes <= ((1 << (8 * L)) - 1), in AES_CCM_encrypt() 231 __FUNCTION__, nbytes, L)); in AES_CCM_encrypt() 239 key, nr, nbytes, tag_length); in AES_CCM_encrypt() 251 while (total < nbytes) { in AES_CCM_encrypt() 256 copy_amt = MIN(nbytes - total, sizeof(staging_block)); in AES_CCM_encrypt() 326 while (total < nbytes) { in decrypt_loop() 389 if (nbytes == 0 && abytes == 0) in AES_CCM_decrypt() 406 if (nbytes > ((1 << (8 * L)) - 1)) in AES_CCM_decrypt() 408 __FUNCTION__, nbytes, L); in AES_CCM_decrypt() [all …]
|
| /freebsd-12.1/contrib/ntp/libntp/ |
| H A D | ntp_crypto_rnd.c | 30 arc4random_buf(void *buf, size_t nbytes); 33 evutil_secure_rng_get_bytes(void *buf, size_t nbytes); 36 arc4random_buf(void *buf, size_t nbytes) in arc4random_buf() argument 38 evutil_secure_rng_get_bytes(buf, nbytes); in arc4random_buf() 91 size_t nbytes in ntp_crypto_random_buf() argument 97 rc = RAND_bytes(buf, size2int_chk(nbytes)); in ntp_crypto_random_buf() 111 arc4random_buf(buf, nbytes); in ntp_crypto_random_buf()
|
| /freebsd-12.1/contrib/gdb/gdb/ |
| H A D | dwarfread.c | 1173 int nbytes; in decode_array_element_type() local 1273 int nbytes; in decode_subscript_data_item() local 1356 int nbytes; in dwarf_read_array_type() local 1655 int nbytes; in enum_type() local 2160 loc += nbytes; in locval() 2465 int nbytes; in add_enum_psymbol() local 3054 int nbytes; in decode_mod_fund_type() local 3100 int nbytes; in decode_mod_u_d_type() local 3165 int nbytes; in decode_modified_type() local 3739 switch (nbytes) in target_to_host() [all …]
|
| /freebsd-12.1/sys/netinet/libalias/ |
| H A D | alias_util.c | 77 int nbytes) in LibAliasInternetChecksum() argument 83 while (nbytes > 1) { in LibAliasInternetChecksum() 85 nbytes -= 2; in LibAliasInternetChecksum() 87 if (nbytes == 1) { in LibAliasInternetChecksum() 113 int nhdr, ntcp, nbytes; in TcpChecksum() local 123 nbytes = ntcp; in TcpChecksum() 125 while (nbytes > 1) { in TcpChecksum() 127 nbytes -= 2; in TcpChecksum() 129 if (nbytes == 1) { in TcpChecksum()
|
| /freebsd-12.1/contrib/tcsh/ |
| H A D | tc.alloc.c | 180 malloc(size_t nbytes) in malloc() argument 201 nbytes++; in malloc() 204 nbytes = MEMALIGN(MEMALIGN(sizeof(union overhead)) + nbytes + RSLOP); in malloc() 205 shiftr = (nbytes - 1) >> 2; in malloc() 243 if (nbytes) in malloc() 389 realloc(ptr_t cp, size_t nbytes) in realloc() argument 399 return (malloc(nbytes)); in realloc() 426 nbytes = MEMALIGN(MEMALIGN(sizeof(union overhead))+nbytes+RSLOP); in realloc() 433 if ((res = malloc(nbytes)) == NULL) in realloc() 441 (void) memmove(res, cp, onb < nbytes ? onb : nbytes); in realloc() [all …]
|
| /freebsd-12.1/contrib/ntp/lib/isc/ |
| H A D | netaddr.c | 107 nbytes = prefixlen / 8; in isc_netaddr_eqprefix() 110 if (nbytes > 0) { in isc_netaddr_eqprefix() 116 INSIST(nbytes < ipabytes); in isc_netaddr_eqprefix() 118 bytea = pa[nbytes]; in isc_netaddr_eqprefix() 119 byteb = pb[nbytes]; in isc_netaddr_eqprefix() 237 nbytes = prefixlen / 8; in isc_netaddr_prefixok() 242 nbytes++; in isc_netaddr_prefixok() 244 if (memcmp(p + nbytes, zeros, ipbytes - nbytes) != 0) in isc_netaddr_prefixok() 270 nbytes = i; in isc_netaddr_masktoprefixlen() 272 unsigned int c = p[nbytes]; in isc_netaddr_masktoprefixlen() [all …]
|
| /freebsd-12.1/lib/libc/locale/ |
| H A D | wcsnrtombs.c | 70 size_t nbytes; in __wcsnrtombs_std() local 74 nbytes = 0; in __wcsnrtombs_std() 82 return (nbytes + nb - 1); in __wcsnrtombs_std() 84 nbytes += nb; in __wcsnrtombs_std() 86 return (nbytes); in __wcsnrtombs_std() 118 return (nbytes + nb - 1); in __wcsnrtombs_std() 123 nbytes += nb; in __wcsnrtombs_std() 126 return (nbytes); in __wcsnrtombs_std()
|