| /freebsd/contrib/libcbor/test/ |
| H A D | copy_test.c | 12 cbor_item_t *item, *copy, *tmp; variable 16 assert_uint8(copy = cbor_copy(item), 10); in test_uints() 18 cbor_decref(©); in test_uints() 21 assert_uint16(copy = cbor_copy(item), 10); in test_uints() 23 cbor_decref(©); in test_uints() 26 assert_uint32(copy = cbor_copy(item), 10); in test_uints() 28 cbor_decref(©); in test_uints() 31 assert_uint64(copy = cbor_copy(item), 10); in test_uints() 33 cbor_decref(©); in test_uints() 38 assert_true(cbor_get_uint8(copy = cbor_copy(item)) == 10); in test_negints() [all …]
|
| /freebsd/sys/contrib/zlib/ |
| H A D | inflate.c | 252 local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) { in updatewindow() argument 274 if (copy >= state->wsize) { in updatewindow() 281 if (dist > copy) dist = copy; in updatewindow() 282 zmemcpy(state->window + state->wnext, end - copy, dist); in updatewindow() 283 copy -= dist; in updatewindow() 284 if (copy) { in updatewindow() 285 zmemcpy(state->window, end - copy, copy); in updatewindow() 286 state->wnext = copy; in updatewindow() 482 unsigned copy; /* number of stored or match bytes to copy */ in inflate() local 611 copy = state->length; in inflate() [all …]
|
| H A D | infback.c | 199 unsigned copy; /* number of stored or match bytes to copy */ in inflateBack() local 278 copy = state->length; in inflateBack() 281 if (copy > have) copy = have; in inflateBack() 282 if (copy > left) copy = left; in inflateBack() 283 zmemcpy(put, next, copy); in inflateBack() 284 have -= copy; in inflateBack() 285 next += copy; in inflateBack() 286 left -= copy; in inflateBack() 287 put += copy; in inflateBack() 288 state->length -= copy; in inflateBack() [all …]
|
| /freebsd/usr.bin/rctl/ |
| H A D | rctl.c | 114 char *copy, *expanded, *tofree; in expand_amount() local 117 tofree = copy = strdup(rule); in expand_amount() 118 if (copy == NULL) { in expand_amount() 123 subject = strsep(©, ":"); in expand_amount() 124 subject_id = strsep(©, ":"); in expand_amount() 125 resource = strsep(©, ":"); in expand_amount() 126 action = strsep(©, "=/"); in expand_amount() 127 amount = strsep(©, "/"); in expand_amount() 128 per = copy; in expand_amount() 135 copy = strdup(rule); in expand_amount() [all …]
|
| /freebsd/crypto/openssh/regress/ |
| H A D | scp.sh | 11 COPY3=${OBJ}/copy.glob[123] 37 cp ${DATA} ${DIR}/copy 38 ln -s ${DIR}/copy ${DIR}/copy-sym 40 cp ${DATA} ${DIR}/subdir/copy 96 cmp ${COPY} ${DIR}/copy || fail "corrupted copy" 102 cmp ${COPY} ${DIR}/copy || fail "corrupted copy" 108 cmp ${COPY} ${DIR}/copy || fail "corrupted copy" 118 cp ${DATA} ${DIR}/copy 125 cp ${DATA} ${DIR}/copy 142 cp ${DATA} ${DIR}/copy [all …]
|
| /freebsd/crypto/openssl/crypto/asn1/ |
| H A D | d2i_pu.c | 32 EVP_PKEY *copy = NULL; in d2i_PublicKey() local 45 if (!evp_pkey_copy_downgraded(©, ret)) in d2i_PublicKey() 51 if ((type != EVP_PKEY_get_id(ret) || copy != NULL) in d2i_PublicKey() 74 if (copy != NULL) { in d2i_PublicKey() 76 ret->pkey.ec = copy->pkey.ec; in d2i_PublicKey() 77 copy->pkey.ec = NULL; in d2i_PublicKey() 91 EVP_PKEY_free(copy); in d2i_PublicKey() 96 EVP_PKEY_free(copy); in d2i_PublicKey()
|
| /freebsd/lib/libc/string/ |
| H A D | strndup.c | 26 char *copy; in strndup() local 30 copy = malloc(len + 1); in strndup() 31 if (copy != NULL) { in strndup() 32 (void)memcpy(copy, str, len); in strndup() 33 copy[len] = '\0'; in strndup() 36 return copy; in strndup()
|
| H A D | strdup.c | 40 char *copy; in strdup() local 43 if ((copy = malloc(len)) == NULL) in strdup() 45 memcpy(copy, str, len); in strdup() 46 return (copy); in strdup()
|
| /freebsd/contrib/mandoc/ |
| H A D | compat_strndup.c | 29 char *copy; in strndup() local 35 copy = malloc(len + 1); in strndup() 36 if (copy != NULL) { in strndup() 37 (void)memcpy(copy, str, len); in strndup() 38 copy[len] = '\0'; in strndup() 41 return copy; in strndup()
|
| /freebsd/crypto/openssh/openbsd-compat/ |
| H A D | strndup.c | 30 char *copy; in strndup() local 34 copy = malloc(len + 1); in strndup() 35 if (copy != NULL) { in strndup() 36 (void)memcpy(copy, str, len); in strndup() 37 copy[len] = '\0'; in strndup() 40 return copy; in strndup()
|
| /freebsd/crypto/openssl/apps/lib/ |
| H A D | app_provider.c | 90 char *copy, *tmp; in opt_provider_param() local 93 if ((copy = OPENSSL_strdup(arg)) == NULL in opt_provider_param() 94 || (p.val = strchr(copy, '=')) == NULL) { in opt_provider_param() 102 while (tmp > copy && isspace(_UC(*--tmp))) in opt_provider_param() 111 if ((p.key = strchr(copy, ':')) != NULL) { in opt_provider_param() 113 p.name = *copy != '\0' ? copy : NULL; in opt_provider_param() 116 p.key = copy; in opt_provider_param() 138 OPENSSL_free(copy); in opt_provider_param()
|
| /freebsd/crypto/krb5/src/lib/krb5/os/ |
| H A D | sn2princ.c | 93 char namebuf[NI_MAXHOST], *qualified = NULL, *copy, *p; in expand_hostname() local 129 copy = strdup(canonhost); in expand_hostname() 130 if (copy == NULL) in expand_hostname() 134 for (p = copy; *p != '\0'; p++) { in expand_hostname() 140 if (copy[0] != '\0') { in expand_hostname() 141 p = copy + strlen(copy) - 1; in expand_hostname() 146 *canonhost_out = copy; in expand_hostname() 254 iter->copy = *iter->princ; in canonicalize_princ() 256 iter->copy.realm = string2data(iter->realm); in canonicalize_princ() 259 iter->copy.data = iter->components; in canonicalize_princ() [all …]
|
| /freebsd/contrib/pam-krb5/portable/ |
| H A D | strndup.c | 39 char *copy; in strndup() local 50 copy = malloc(length + 1); in strndup() 51 if (copy == NULL) in strndup() 53 memcpy(copy, s, length); in strndup() 54 copy[length] = '\0'; in strndup() 55 return copy; in strndup()
|
| /freebsd/contrib/kyua/utils/config/ |
| H A D | nodes_test.cpp | 88 config::bool_node* copy = static_cast< config::bool_node* >(raw_copy); in ATF_TEST_CASE_BODY() local 89 ATF_REQUIRE(copy->value()); in ATF_TEST_CASE_BODY() 90 copy->set(false); in ATF_TEST_CASE_BODY() 92 ATF_REQUIRE(!copy->value()); in ATF_TEST_CASE_BODY() 93 delete copy; in ATF_TEST_CASE_BODY() 195 config::int_node* copy = static_cast< config::int_node* >(raw_copy); in ATF_TEST_CASE_BODY() local 196 ATF_REQUIRE_EQ(5, copy->value()); in ATF_TEST_CASE_BODY() 197 copy->set(10); in ATF_TEST_CASE_BODY() 199 ATF_REQUIRE_EQ(10, copy->value()); in ATF_TEST_CASE_BODY() 200 delete copy; in ATF_TEST_CASE_BODY() [all …]
|
| /freebsd/contrib/nvi/common/ |
| H A D | util.c | 231 char *copy; local 233 MALLOC(sp, copy, len + 1); 234 if (copy == NULL) 236 memcpy(copy, str, len); 237 copy[len] = '\0'; 238 return (copy); 250 CHAR_T *copy; local 252 MALLOC(sp, copy, (len + 1) * sizeof(CHAR_T)); 253 if (copy == NULL) 255 MEMCPY(copy, str, len); [all …]
|
| /freebsd/crypto/krb5/src/ |
| H A D | Makefile.in | 448 copy include\krb5.h "$(KRB_INSTALL_DIR)\include\." 449 copy include\krb5\krb5.h "$(KRB_INSTALL_DIR)\include\krb5\." 450 copy include\win-mac.h "$(KRB_INSTALL_DIR)\include\." 451 copy include\profile.h "$(KRB_INSTALL_DIR)\include\." 452 copy include\com_err.h "$(KRB_INSTALL_DIR)\include\." 453 copy include\gssapi\gssapi.h "$(KRB_INSTALL_DIR)\include\gssapi\." 454 copy include\gssapi\gssapi_alloc.h "$(KRB_INSTALL_DIR)\include\gssapi\." 455 copy include\gssapi\gssapi_krb5.h "$(KRB_INSTALL_DIR)\include\gssapi\." 456 copy include\gssapi\gssapi_ext.h "$(KRB_INSTALL_DIR)\include\gssapi\." 457 copy lib\$(OUTPRE)*.lib "$(KRB_INSTALL_DIR)\lib\." [all …]
|
| /freebsd/sys/netgraph/ |
| H A D | ng_message.h | 417 #define NG_COPYMESSAGE(copy, msg, how) \ argument 419 (copy) = malloc(sizeof(struct ng_mesg) \ 421 if ((copy) == NULL) \ 423 (copy)->header.version = NG_VERSION; \ 424 (copy)->header.arglen = (msg)->header.arglen; \ 425 (copy)->header.token = (msg)->header.token; \ 426 (copy)->header.typecookie = (msg)->header.typecookie; \ 427 (copy)->header.cmd = (msg)->header.cmd; \ 428 (copy)->header.flags = (msg)->header.flags; \ 429 bcopy((msg)->header.cmdstr, (copy)->header.cmdstr, \ [all …]
|
| /freebsd/sys/libkern/ |
| H A D | strndup.c | 41 char *copy; in strndup() local 44 copy = malloc(len + 1, type, M_WAITOK); in strndup() 45 memcpy(copy, string, len); in strndup() 46 copy[len] = '\0'; in strndup() 47 return (copy); in strndup()
|
| H A D | strdup.c | 43 char *copy; in strdup_flags() local 46 copy = malloc(len, type, flags); in strdup_flags() 47 if (copy == NULL) in strdup_flags() 49 memcpy(copy, string, len); in strdup_flags() 50 return (copy); in strdup_flags()
|
| /freebsd/sys/dev/cxgbe/cudbg/ |
| H A D | fastlz.c | 194 unsigned int copy; in FASTLZ_COMPRESSOR() local 214 copy = 2; in FASTLZ_COMPRESSOR() 317 if (copy) in FASTLZ_COMPRESSOR() 319 *(op - copy - 1) = copy - 1; in FASTLZ_COMPRESSOR() 325 copy = 0; in FASTLZ_COMPRESSOR() 397 copy++; in FASTLZ_COMPRESSOR() 398 if (FASTLZ_UNEXPECT_CONDITIONAL(copy == MAX_COPY)) { in FASTLZ_COMPRESSOR() 399 copy = 0; in FASTLZ_COMPRESSOR() 408 copy++; in FASTLZ_COMPRESSOR() 409 if (copy == MAX_COPY) { in FASTLZ_COMPRESSOR() [all …]
|
| /freebsd/usr.bin/units/ |
| H A D | units.c | 16 * I would appreciate (though I do not require) receiving a copy of any 482 char *copy; in lookupunit() local 490 copy = dupstr(unit); in lookupunit() 491 copy[strlen(copy) - 1] = 0; in lookupunit() 493 if (!strcmp(unittable[i].uname, copy)) { in lookupunit() 494 strlcpy(buffer, copy, sizeof(buffer)); in lookupunit() 495 free(copy); in lookupunit() 499 free(copy); in lookupunit() 501 copy in lookupunit() [all...] |
| /freebsd/contrib/pam-krb5/tests/pam-util/ |
| H A D | vector-t.c | 33 struct vector *vector, *ovector, *copy; in main() local 64 copy = vector_copy(vector); in main() 65 ok(copy != NULL, "vector_copy returns non-NULL"); in main() 66 if (copy == NULL) in main() 68 is_int(4, copy->count, "...and has right count"); in main() 69 is_int(4, copy->allocated, "...and has right allocated count"); in main() 71 is_string(cstring, copy->strings[i], "...and string %lu is right", in main() 73 ok(copy->strings[i] != vector->strings[i], in main() 76 vector_free(copy); in main()
|
| /freebsd/crypto/openssl/util/ |
| H A D | merge-err-lines | 23 my $copy = $_; 24 chop($copy); 25 $copy =~ s/ +$//; 28 $_ = $copy . ' ' . $next;
|
| /freebsd/contrib/tcpdump/missing/ |
| H A D | strdup.c | 45 char *copy; local 48 if ((copy = malloc(len)) == NULL) 50 memcpy(copy, str, len); 51 return (copy);
|
| /freebsd/stand/libsa/ |
| H A D | strdup.c | 38 char *copy = NULL; in strdup() local 42 if ((copy = malloc(len)) == NULL) in strdup() 44 memcpy(copy, str, len); in strdup() 46 return (copy); in strdup()
|