/freebsd/sys/contrib/libsodium/test/default/ |
H A D | codecs.c | 7 unsigned char buf1[1000]; in main() local 37 if (sodium_hex2bin(buf1, 1U, hex, 8U, NULL, &bin_len, &hex_end) != -1) { in main() 43 if (sodium_hex2bin(buf1, 4U, hex, 12U, ":", &bin_len, &hex_end) != -1) { in main() 51 if (sodium_hex2bin(buf1, sizeof buf1, hex, 12U, ":", in main() 58 if (sodium_hex2bin(buf1, sizeof buf1, hex, 13U, ":", in main() 65 if (sodium_hex2bin(buf1, sizeof buf1, hex, 12U, ":", in main() 71 if (sodium_hex2bin(buf1, sizeof buf1, hex, 12U, ":", in main() 78 if (sodium_hex2bin(buf1, sizeof buf1, hex, 12U, ":", in main() 128 memset(buf1, '*', sizeof buf1); in main() 129 assert(sodium_base642bin(buf1, sizeof buf1, b64, strlen(b64), "\n\r ", &bin_len, in main() [all …]
|
H A D | sodium_utils.c | 8 unsigned char buf1[1000]; in main() local 22 randombytes_buf(buf1, sizeof buf1); in main() 23 memcpy(buf2, buf1, sizeof buf2); in main() 24 printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1)); in main() 25 sodium_memzero(buf1, 0U); in main() 26 printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1)); in main() 27 sodium_memzero(buf1, sizeof buf1 / 2); in main() 28 printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1)); in main() 29 printf("%d\n", sodium_memcmp(buf1, buf2, 0U)); in main() 31 printf("%d\n", sodium_memcmp(buf1, buf2, sizeof buf1)); in main() [all …]
|
/freebsd/contrib/netbsd-tests/lib/libc/string/ |
H A D | t_strcmp.c | 27 char buf1[64]; in ATF_TC_BODY() local 81 memcpy(&buf1[a1], tab[t].val1, in ATF_TC_BODY() 84 ret = f(&buf0[a0], &buf1[a1]); in ATF_TC_BODY() 92 &buf0[a0], &buf1[a1], ret); in ATF_TC_BODY() 108 char buf1[10] = "xxx"; in ATF_TC_BODY() local 111 ATF_CHECK(strcmp(buf1, buf1) == 0); in ATF_TC_BODY() 118 ATF_CHECK(strcmp(buf1 + 0, buf2 + 0) < 0); in ATF_TC_BODY() 119 ATF_CHECK(strcmp(buf1 + 1, buf2 + 1) < 0); in ATF_TC_BODY() 120 ATF_CHECK(strcmp(buf1 + 2, buf2 + 2) < 0); in ATF_TC_BODY() 121 ATF_CHECK(strcmp(buf1 + 3, buf2 + 3) == 0); in ATF_TC_BODY() [all …]
|
H A D | t_strcpy.c | 27 char buf1[64]; in ATF_TC_BODY() local 90 memcpy(&buf1[a1], tab[t].val, tab[t].len + 1); in ATF_TC_BODY() 91 ret = f(&buf0[a0], &buf1[a1]); in ATF_TC_BODY() 107 if (memcmp(&buf0[a0], &buf1[a1], in ATF_TC_BODY()
|
H A D | t_strcat.c | 27 char buf1[64]; in ATF_TC_BODY() local 93 memcpy(&buf1[a1], tab[t1].val, in ATF_TC_BODY() 96 ret = f(&buf0[a0], &buf1[a1]); in ATF_TC_BODY() 112 &buf1[a1], in ATF_TC_BODY()
|
/freebsd/crypto/openssl/test/ |
H A D | packettest.c | 243 char buf1[10], buf2[10]; in test_PACKET_strndup() local 248 memset(buf1, 'x', 10); in test_PACKET_strndup() 252 if (!TEST_true(PACKET_buf_init(&pkt, (unsigned char*)buf1, 10)) in test_PACKET_strndup() 255 || !TEST_strn_eq(data, buf1, 10) in test_PACKET_strndup() 270 char buf1[10], buf2[10]; in test_PACKET_contains_zero_byte() local 273 memset(buf1, 'x', 10); in test_PACKET_contains_zero_byte() 277 if (!TEST_true(PACKET_buf_init(&pkt, (unsigned char*)buf1, 10)) in test_PACKET_contains_zero_byte() 305 unsigned char buf1[BUF_LEN] = { 0 }; in test_PACKET_buf_init() local 309 if (!TEST_true(PACKET_buf_init(&pkt, buf1, 4)) in test_PACKET_buf_init() 311 || !TEST_true(PACKET_buf_init(&pkt, buf1, BUF_LEN)) in test_PACKET_buf_init() [all …]
|
/freebsd/tests/sys/geom/class/eli/ |
H A D | unaligned_io.c | 51 char *buf1, *buf2; in main() local 77 buf1 = mmap(NULL, bufsz, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, in main() 79 if (buf1 == MAP_FAILED) in main() 86 arc4random_buf(buf1, bufsz); in main() 87 n = pwrite(fd, buf1, bufsz, 0); in main() 103 n = pread(fd, buf1, iosz, 0); in main() 110 if (memcmp(buf1, buf2 + i, iosz) != 0) in main() 118 arc4random_buf(buf1, bufsz); in main() 120 n = pwrite(fd, buf1 + i, iosz, 0); in main() 126 if (memcmp(buf1 + i, buf2, iosz) != 0) in main()
|
/freebsd/contrib/ntp/sntp/libevent/test/ |
H A D | regress_buffer.c | 461 struct evbuffer *buf1 = NULL, *buf2 = NULL; in test_evbuffer_remove_buffer_with_empty_front() local 463 buf1 = evbuffer_new(); in test_evbuffer_remove_buffer_with_empty_front() 464 tt_assert(buf1); in test_evbuffer_remove_buffer_with_empty_front() 469 tt_int_op(evbuffer_add_reference(buf1, "foo", 3, NULL, NULL), ==, 0); in test_evbuffer_remove_buffer_with_empty_front() 470 tt_int_op(evbuffer_prepend(buf1, "", 0), ==, 0); in test_evbuffer_remove_buffer_with_empty_front() 471 tt_int_op(evbuffer_remove_buffer(buf1, buf2, 1), ==, 1); in test_evbuffer_remove_buffer_with_empty_front() 472 tt_int_op(evbuffer_add(buf1, "bar", 3), ==, 0); in test_evbuffer_remove_buffer_with_empty_front() 473 tt_mem_op(evbuffer_pullup(buf1, -1), ==, "oobar", 5); in test_evbuffer_remove_buffer_with_empty_front() 475 evbuffer_validate(buf1); in test_evbuffer_remove_buffer_with_empty_front() 479 if (buf1) in test_evbuffer_remove_buffer_with_empty_front() [all …]
|
/freebsd/contrib/libevent/test/ |
H A D | regress_buffer.c | 461 struct evbuffer *buf1 = NULL, *buf2 = NULL; in test_evbuffer_remove_buffer_with_empty_front() local 463 buf1 = evbuffer_new(); in test_evbuffer_remove_buffer_with_empty_front() 464 tt_assert(buf1); in test_evbuffer_remove_buffer_with_empty_front() 469 tt_int_op(evbuffer_add_reference(buf1, "foo", 3, NULL, NULL), ==, 0); in test_evbuffer_remove_buffer_with_empty_front() 470 tt_int_op(evbuffer_prepend(buf1, "", 0), ==, 0); in test_evbuffer_remove_buffer_with_empty_front() 471 tt_int_op(evbuffer_remove_buffer(buf1, buf2, 1), ==, 1); in test_evbuffer_remove_buffer_with_empty_front() 472 tt_int_op(evbuffer_add(buf1, "bar", 3), ==, 0); in test_evbuffer_remove_buffer_with_empty_front() 473 tt_mem_op(evbuffer_pullup(buf1, -1), ==, "oobar", 5); in test_evbuffer_remove_buffer_with_empty_front() 475 evbuffer_validate(buf1); in test_evbuffer_remove_buffer_with_empty_front() 479 if (buf1) in test_evbuffer_remove_buffer_with_empty_front() [all …]
|
/freebsd/contrib/bearssl/src/hash/ |
H A D | ghash_pwr8.c | 123 const unsigned char *buf1, *buf2; in br_ghash_pwr8() local 134 buf1 = data; in br_ghash_pwr8() 149 buf2 = buf1 + (num4 << 6); in br_ghash_pwr8() 255 lxvw4x(52, %[cc0], %[buf1]) in br_ghash_pwr8() 256 lxvw4x(53, %[cc1], %[buf1]) in br_ghash_pwr8() 257 lxvw4x(54, %[cc2], %[buf1]) in br_ghash_pwr8() 258 lxvw4x(55, %[cc3], %[buf1]) in br_ghash_pwr8() 263 addi(%[buf1], %[buf1], 64) in br_ghash_pwr8() 382 : [buf1] "+b" (buf1), [buf2] "+b" (buf2) in br_ghash_pwr8()
|
H A D | ghash_pclmul.c | 235 const unsigned char *buf1, *buf2; in br_ghash_pclmul() local 247 buf1 = data; in br_ghash_pclmul() local 250 buf2 = buf1 + (num4 << 6); in br_ghash_pclmul() 304 aw0 = _mm_loadu_si128((void *)(buf1 + 0)); in br_ghash_pclmul() 305 aw1 = _mm_loadu_si128((void *)(buf1 + 16)); in br_ghash_pclmul() 306 aw2 = _mm_loadu_si128((void *)(buf1 + 32)); in br_ghash_pclmul() 307 aw3 = _mm_loadu_si128((void *)(buf1 + 48)); in br_ghash_pclmul() 312 buf1 += 64; in br_ghash_pclmul()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/tmpfile/ |
H A D | tmpfile_001_pos.c | 43 char buf1[BSZ], buf2[BSZ] = {0}; in main() local 51 fill_random(buf1, BSZ); in main() 57 if (write(fd, buf1, BSZ) < 0) in main() 63 if (memcmp(buf1, buf2, BSZ) != 0) in main() 68 if (fsetxattr(fd, "user.test", buf1, BSZ, 0) < 0) in main() 74 if (memcmp(buf1, buf2, BSZ) != 0) in main()
|
/freebsd/contrib/netbsd-tests/crypto/opencrypto/ |
H A D | h_comp.c | 48 unsigned char buf1[10000], buf2[100000]; in main() local 64 co1.dst = buf1; in main() 65 co1.dst_len = sizeof(buf1); in main() 71 buf1[co1.dst_len - 8]++; /* modify CRC */ in main() 73 write(1, buf1, co1.dst_len); in main() 78 co2.src = buf1; in main()
|
H A D | h_comp_zlib.c | 47 unsigned char buf1[10000], buf2[10000]; in main() local 64 co1.dst = buf1; in main() 65 co1.dst_len = sizeof(buf1); in main() 72 z.next_in = buf1; in main()
|
H A D | h_comp_zlib_rnd.c | 49 unsigned char buf1[10000], buf2[10000]; in main() local 69 co1.dst = buf1; in main() 70 co1.dst_len = sizeof(buf1); in main() 76 z.next_in = buf1; in main()
|
/freebsd/usr.bin/locate/bigram/ |
H A D | locate.bigram.c | 44 u_char buf1[LOCATE_PATH_MAX] = " "; variable 52 u_char *oldpath = buf1, *path = buf2; in main() 78 if (path == buf1) { in main() 80 oldpath = buf1; in main() 82 path = buf1; in main()
|
/freebsd/usr.bin/cmp/ |
H A D | link.c | 44 char buf1[PATH_MAX], *p1; in c_link() local 51 if ((len1 = readlink(file1, buf1, sizeof(buf1) - 1)) < 0) { in c_link() 67 buf1[len1] = '\0'; in c_link() 75 for (p1 = buf1 + skip1, p2 = buf2 + skip2; in c_link()
|
/freebsd/bin/stty/ |
H A D | print.c | 50 char buf1[100], buf2[100]; in print() local 192 (void)snprintf(buf1, sizeof(buf1), "%s = %s;", in print() 194 bput(buf1); in print() 203 (void)snprintf(buf1 + cnt * 8, sizeof(buf1) - cnt * 8, in print() 209 (void)printf("%s\n", buf1); in print() 214 (void)printf("%s\n", buf1); in print()
|
/freebsd/lib/libc/iconv/ |
H A D | citrus_esdb.c | 196 char buf1[PATH_MAX], buf2[PATH_MAX], path[PATH_MAX]; in _citrus_esdb_open() local 200 realname = _lookup_alias(path, esname, buf1, sizeof(buf1), in _citrus_esdb_open() 317 char buf1[PATH_MAX]; in _citrus_esdb_get_list() local 319 snprintf(buf1, sizeof(buf1), "%.*s", in _citrus_esdb_get_list() 322 if ((p = strchr(buf1, '/')) != NULL) in _citrus_esdb_get_list() 323 memmove(buf1, p + 1, strlen(p) - 1); in _citrus_esdb_get_list() 324 if ((p = strstr(buf1, ".esdb")) != NULL) in _citrus_esdb_get_list() 326 snprintf(buf, sizeof(buf), "%s/%.*s", buf1, in _citrus_esdb_get_list()
|
/freebsd/sbin/ccdconfig/ |
H A D | ccdconfig.c | 170 char buf1[BUFSIZ]; in do_single() local 187 sprintf(buf1, "ccd%d", ccd); in do_single() 188 gctl_ro_param(grq, "geom", -1, buf1); in do_single() 257 sprintf(buf1, "provider%d", i); in do_single() 261 gctl_ro_param(grq, buf1, -1, cp); in do_single() 263 buf1[0] = '\0'; in do_single() 264 gctl_add_param(grq, "output", sizeof(buf1), buf1, in do_single() 269 printf("%s", buf1); in do_single()
|
/freebsd/usr.bin/locate/code/ |
H A D | locate.code.c | 91 u_char buf1[LOCATE_PATH_MAX] = " "; variable 141 oldpath = buf1; in main() 211 if (path == buf1) { /* swap pointers */ in main() 213 oldpath = buf1; in main() 215 path = buf1; in main()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | get_diff.c | 47 char buf1[DEV_BSIZE], buf2[DEV_BSIZE]; in main() local 67 while ((bytes = pread(fd1, buf1, DEV_BSIZE, off)) > 0) { in main() 76 buf2[0] = ~buf1[0]; in main() 82 if (memcmp(buf1, buf2, bytes) == 0) { in main()
|
/freebsd/sbin/gbde/ |
H A D | gbde.c |
|
/freebsd/crypto/heimdal/lib/roken/ |
H A D | snprintf-test.c | 42 char buf1[256], buf2[256]; in try() local 45 ret = rk_vsnprintf (buf1, sizeof(buf1), format, ap); in try() 46 if (ret >= sizeof(buf1)) in try() 51 ret = strcmp (buf1, buf2); in try() 54 format, buf1, buf2); in try()
|
/freebsd/contrib/netbsd-tests/lib/libc/stdio/ |
H A D | t_fmemopen.c | 798 char buf0[BUFSIZ], buf1[BUFSIZ]; in ATF_TC_BODY() local 805 buf1[t->n] = 0x1; in ATF_TC_BODY() 812 ATF_CHECK(fread(&buf1[0], 1, sizeof(buf1), fp) == (size_t)t->n); in ATF_TC_BODY() 814 ATF_CHECK(memcmp(&buf0[0], &buf1[0], t->n) == 0); in ATF_TC_BODY() 815 ATF_CHECK((unsigned char)buf1[t->n] == 0x1); in ATF_TC_BODY() 888 char buf0[BUFSIZ], buf1[BUFSIZ]; in ATF_TC_BODY() local 896 buf1[t->n - len] = 0x1; in ATF_TC_BODY() 906 ATF_CHECK(fread(&buf1[0], 1, sizeof(buf1), fp) in ATF_TC_BODY() 909 ATF_CHECK(!memcmp(&buf0[len], &buf1[0], t->n - len)); in ATF_TC_BODY() 910 ATF_CHECK((unsigned char)buf1[t->n - len] == 0x1); in ATF_TC_BODY() [all …]
|