Searched refs:buf (Results 1 - 25 of 183) sorted by relevance

12345678

/bionic/tests/
H A Dasync_safe_test.cpp25 char buf[BUFSIZ]; local
27 async_safe_format_buffer(buf, sizeof(buf), "a");
28 EXPECT_STREQ("a", buf);
30 async_safe_format_buffer(buf, sizeof(buf), "%%");
31 EXPECT_STREQ("%", buf);
33 async_safe_format_buffer(buf, sizeof(buf), "01234");
34 EXPECT_STREQ("01234", buf);
113 char buf[BUFSIZ]; local
123 char buf[BUFSIZ]; local
133 char buf[BUFSIZ]; local
147 char buf[BUFSIZ]; local
161 char buf[BUFSIZ]; local
171 char buf[BUFSIZ]; local
181 char buf[BUFSIZ]; local
[all...]
H A Dstack_protector_test_helper.cpp19 char buf[128]; local
23 volatile char* p = buf;
24 int size = static_cast<int>(sizeof(buf) + 1);
25 while ((p - buf) < size) *p++ = '\0';
H A Dfortify_compilation_test.cpp32 char buf[4]; local
37 sprintf(buf, "foobar"); // NOLINT(runtime/printf)
42 sprintf(buf, "%s", "foobar"); // NOLINT(runtime/printf)
46 char buf[4]; local
51 snprintf(buf, 5, "foobar"); // NOLINT(runtime/printf)
56 snprintf(buf, 5, "%s", "foobar"); // NOLINT(runtime/printf)
61 snprintf(buf, 5, " %s ", "foobar"); // NOLINT(runtime/printf)
66 snprintf(buf, 5, "%d", 100000); // NOLINT(runtime/printf)
70 char buf[4]; local
75 memcpy(buf, "fooba
79 char buf[4]; local
88 char buf[4]; local
97 char buf[4]; local
106 char buf[4]; local
115 char buf[4]; local
124 char buf[4] = ""; local
133 char buf[4] = ""; local
144 char buf[4]; local
156 char buf[4]; local
168 char buf[4]; local
182 char buf[4]; local
199 char buf[4]; local
236 char buf[4]; local
244 char buf[4]; local
252 char buf[4] = {0}; local
260 char buf[4] = {0}; local
268 char buf[4]; local
276 char buf[4] = {0}; local
284 void *buf = calloc(atoi("5"), 1); local
292 char buf[4] = {0}; local
300 char buf[4] = {0}; local
315 char buf[4] = {0}; local
325 char buf[4] = {0}; local
[all...]
H A Dstring_posix_strerror_r_test.cpp41 char buf[256]; local
44 ASSERT_EQ(0, strerror_r(0, buf, sizeof(buf)));
45 ASSERT_STREQ("Success", buf);
46 ASSERT_EQ(0, strerror_r(1, buf, sizeof(buf)));
47 ASSERT_STREQ("Operation not permitted", buf);
50 ASSERT_EQ(0, strerror_r(-1, buf, sizeof(buf)));
51 ASSERT_STREQ("Unknown error -1", buf);
[all...]
H A Dlibgen_test.cpp44 char* buf, size_t buf_size, int expected_errno) {
46 int rc = basename_r(in, buf, buf_size);
48 if (rc != -1 && buf != NULL) {
49 ASSERT_STREQ(expected_out, buf) << in;
55 char* buf, size_t buf_size, int expected_errno) {
57 int rc = dirname_r(in, buf, buf_size);
59 if (rc != -1 && buf != NULL) {
60 ASSERT_STREQ(expected_out, buf) << in;
68 char buf[256]; local
70 TestBasename("", ".", -1, buf,
43 TestBasename(const char* in, const char* expected_out, int expected_rc, char* buf, size_t buf_size, int expected_errno) argument
54 TestDirname(const char* in, const char* expected_out, int expected_rc, char* buf, size_t buf_size, int expected_errno) argument
87 char buf[256]; local
[all...]
H A Dresolv_test.cpp42 uint8_t buf[128]; local
43 ASSERT_EQ(128, b64_pton(data, buf, sizeof(buf)));
H A Dfortify_test.cpp301 char buf[10]; local
303 ASSERT_FORTIFY(strcpy(buf, orig));
313 char buf[0]; local
315 ASSERT_FORTIFY(strcpy(buf, orig));
325 char buf[0]; local
327 ASSERT_FORTIFY(strcpy(buf, orig));
337 char buf[1]; local
339 ASSERT_FORTIFY(strcpy(buf, orig));
348 char buf[10]; local
349 memcpy(buf, "012345678
358 char buf[10]; local
368 char buf[10]; local
402 char buf[10]; local
414 char* buf = (char *) malloc(10); local
423 char buf[5]; local
428 char buf[10]; local
447 char buf[10]; local
467 char buf[10]; local
474 char buf[10]; local
483 char buf[10]; local
489 char buf[20]; local
504 char buf[10]; local
549 char buf[10]; local
562 char buf[10]; local
568 char buf[10] = {0}; local
581 char buf[1]; local
587 char buf[1]; local
593 char buf[1]; local
601 char buf[1]; local
609 char buf[1] = {0}; local
617 char buf[1] = {0}; local
625 char buf[1]; local
633 char buf[1] = {0}; local
641 char buf[1]; local
649 char buf[1] = {0}; local
657 char buf[1]; local
663 char buf[1]; local
672 char buf[10]; local
691 char buf[10]; local
710 char buf[10]; local
728 char buf[10]; local
746 char buf[10]; local
765 char buf[10]; local
785 char buf[10]; local
804 char buf[10]; local
901 char buf[10]; local
922 char buf[10]; local
931 char buf[10]; local
940 char buf[10]; local
962 char buf[BUFSIZ]; local
975 pollfd buf[1] = {{0, POLLIN, 0}}; local
982 pollfd buf[1] = {{0, POLLIN, 0}}; local
[all...]
H A Dsys_xattr_test.cpp26 char buf[10]; local
28 ASSERT_EQ(4, getxattr(tf.filename, "user.foo", buf, sizeof(buf)));
29 ASSERT_STREQ("bar", buf);
30 buf[0] = '\0';
31 ASSERT_EQ(4, lgetxattr(tf.filename, "user.foo", buf, sizeof(buf)));
32 ASSERT_STREQ("bar", buf);
37 char buf[10]; local
39 ASSERT_EQ(4, fgetxattr(tf.fd, "user.foo", buf, sizeo
45 char buf[10]; local
52 char buf[10]; local
59 char buf[10]; local
75 char buf[10]; local
93 char buf[10]; local
106 char buf[65536]; // 64kB is max possible xattr list size. See "man 7 xattr". local
115 char buf[65536]; // 64kB is max possible xattr list size. See "man 7 xattr". local
[all...]
H A Dqsort_test.cpp53 long buf[BUFFER_SIZE]; local
58 buf[i] = i;
68 t = buf[pos1];
69 buf[pos1] = buf[pos2];
70 buf[pos2] = t;
74 qsort(buf, BUFFER_SIZE, sizeof(buf[0]), &cmp_long);
77 EXPECT_EQ(i, buf[i]);
81 int buf[BUFFER_SIZ local
[all...]
H A Dinttypes_test.cpp25 char buf[512]; \
26 memset(buf, 0, sizeof(buf)); \
27 snprintf(buf, sizeof(buf), "%" PRId##FMT_SUFFIX, int##TYPE_SUFFIX(123)); \
28 EXPECT_STREQ("123", buf); \
29 memset(buf, 0, sizeof(buf)); \
30 snprintf(buf, sizeof(buf), "
[all...]
H A Dstdio_test.cpp266 char buf[32]; local
267 snprintf(buf, sizeof(buf), "%zd", v);
272 char buf[BUFSIZ]; local
273 EXPECT_EQ(23, snprintf(buf, sizeof(buf), "<%a>", 9990.235));
274 EXPECT_STREQ("<0x1.3831e147ae148p+13>", buf);
278 char buf[BUFSIZ]; local
280 EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<
285 char buf[BUFSIZ]; local
299 char buf[32]; local
310 char buf[BUFSIZ]; local
412 T buf[BUFSIZ]; local
539 char buf[BUFSIZ]; local
545 char buf[BUFSIZ]; local
551 char buf[BUFSIZ]; local
561 char buf[BUFSIZ]; local
571 char buf[BUFSIZ]; local
577 char buf[BUFSIZ]; local
583 char buf[BUFSIZ]; local
593 char buf[BUFSIZ]; local
618 char buf[BUFSIZ]; local
639 char buf[PATH_MAX]; local
657 char buf[128]; local
709 char buf[16]; local
930 char buf[16]; local
952 char buf[16]; local
1053 char buf[65*1024]; local
1191 char buf[6] = {0}; local
1417 char buf[L_ctermid] = {}; local
1445 char buf[16]; local
1457 std::string buf = "world"; local
1464 std::string buf = "world"; local
[all...]
/bionic/libc/upstream-openbsd/lib/libc/stdio/
H A Dgets.c41 gets(char *buf) argument
47 for (s = buf; (c = getchar_unlocked()) != '\n';)
49 if (s == buf) {
58 return (buf);
H A Dvdprintf.c44 __dwrite(void *cookie, const char *buf, int n) argument
47 return (write(*fdp, buf, n));
55 unsigned char buf[BUFSIZ]; local
60 f._p = buf;
61 f._w = sizeof(buf);
64 f._bf._base = buf;
65 f._bf._size = sizeof(buf);
/bionic/libc/bionic/
H A Dgetcwd.cpp35 extern "C" int __getcwd(char* buf, size_t size);
37 char* getcwd(char* buf, size_t size) __overloadable {
39 if (buf != NULL && size == 0) {
47 if (buf == NULL) {
53 buf = allocated_buf = static_cast<char*>(malloc(allocated_size));
54 if (buf == NULL) {
62 int rc = __getcwd(buf, allocated_size);
72 buf = strdup(allocated_buf);
75 buf = allocated_buf;
79 return buf;
[all...]
H A Dether_ntoa.c38 ether_ntoa_r (const struct ether_addr *addr, char * buf) argument
40 snprintf(buf, 18, "%02x:%02x:%02x:%02x:%02x:%02x",
44 return buf;
53 static char buf[18]; local
54 return ether_ntoa_r(addr, buf);
H A Drecv.cpp32 ssize_t recv(int socket, void *buf, size_t len, int flags) { argument
33 return recvfrom(socket, buf, len, flags, NULL, 0);
H A Dsend.cpp31 ssize_t send(int socket, const void* buf, size_t len, int flags) __overloadable {
32 return sendto(socket, buf, len, flags, NULL, 0);
H A Dfchmod.cpp60 char buf[40]; local
61 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd);
63 result = chmod(buf, mode);
H A Dflistxattr.cpp55 char buf[40]; local
56 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd);
58 return listxattr(buf, list, size);
H A Dmntent.cpp39 mntent* getmntent_r(FILE* fp, struct mntent* e, char* buf, int buf_len) { argument
41 while (fgets(buf, buf_len, fp) != NULL) {
45 if (sscanf(buf, " %n%*s%n %n%*s%n %n%*s%n %n%*s%n %d %d",
48 e->mnt_fsname = &buf[fsname0];
49 buf[fsname1] = '\0';
51 e->mnt_dir = &buf[dir0];
52 buf[dir1] = '\0';
54 e->mnt_type = &buf[type0];
55 buf[type1] = '\0';
57 e->mnt_opts = &buf[opts
[all...]
H A Dgethostname.cpp34 int gethostname(char* buf, size_t n) { argument
46 memcpy(buf, name.nodename, name_length);
/bionic/libc/upstream-openbsd/lib/libc/locale/
H A Dwctob.c37 char buf[MB_LEN_MAX]; local
40 if (c == WEOF || wcrtomb(buf, c, &mbs) != 1)
42 return ((unsigned char)*buf);
/bionic/libc/dns/nameser/
H A Dns_print.c59 char **buf, size_t *buflen);
62 char **buf, size_t *buflen);
63 static void addlen(size_t len, char **buf, size_t *buflen);
65 char **buf, size_t *buflen);
67 char **buf, size_t *buflen);
85 * Number of characters written to buf, or -1 (check errno).
90 char *buf, size_t buflen)
97 name_ctx, origin, buf, buflen);
105 * Number of characters written to buf, or -1 (check errno).
112 char *buf, size_
88 ns_sprintrr(const ns_msg *handle, const ns_rr *rr, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument
108 ns_sprintrrf(const u_char *msg, size_t msglen, const char *name, ns_class class, ns_type type, u_long ttl, const u_char *rdata, size_t rdlen, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument
164 addlen(strlen(buf), &buf, &buflen); local
334 addlen(strlen(buf), &buf, &buflen); local
425 addlen(strlen(buf), &buf, &buflen); local
669 addlen(strlen(buf), &buf, &buflen); local
692 addlen(strlen(buf), &buf, &buflen); local
964 addlen(strlen(buf), &buf, &buflen); local
969 addlen(strlen(buf), &buf, &buflen); local
1142 charstr(const u_char *rdata, const u_char *edata, char **buf, size_t *buflen) argument
1177 addname(const u_char *msg, size_t msglen, const u_char **pp, const char *origin, char **buf, size_t *buflen) argument
1222 addlen(size_t len, char **buf, size_t *buflen) argument
1229 addstr(const char *src, size_t len, char **buf, size_t *buflen) argument
1241 addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) argument
[all...]
/bionic/libc/private/
H A Dbionic_arc4random.h42 void __libc_safe_arc4random_buf(void* buf, size_t n, KernelArgumentBlock& args);
/bionic/benchmarks/
H A Dutil.h25 char *GetAlignedPtr(std::vector<char>* buf, size_t alignment, size_t nbytes);
27 char *GetAlignedPtrFilled(std::vector<char>* buf, size_t alignment, size_t nbytes, char fill_byte);

Completed in 277 milliseconds

12345678