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

123456

/bionic/tests/
H A Dlibc_logging_test.cpp26 char buf[BUFSIZ]; local
28 __libc_format_buffer(buf, sizeof(buf), "a");
29 EXPECT_STREQ("a", buf);
31 __libc_format_buffer(buf, sizeof(buf), "%%");
32 EXPECT_STREQ("%", buf);
34 __libc_format_buffer(buf, sizeof(buf), "01234");
35 EXPECT_STREQ("01234", buf);
114 char buf[BUFSIZ]; local
124 char buf[BUFSIZ]; local
134 char buf[BUFSIZ]; local
148 char buf[BUFSIZ]; local
162 char buf[BUFSIZ]; local
172 char buf[BUFSIZ]; local
182 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);
26 // The generic x86-64 target leaves an 8-byte gap between `buf` and the stack guard.
30 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
[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 Dfortify_test.cpp363 char buf[10]; local
365 ASSERT_FORTIFY(strcpy(buf, orig));
375 char buf[0]; local
377 ASSERT_FORTIFY(strcpy(buf, orig));
387 char buf[0]; local
389 ASSERT_FORTIFY(strcpy(buf, orig));
399 char buf[1]; local
401 ASSERT_FORTIFY(strcpy(buf, orig));
410 char buf[10]; local
411 memcpy(buf, "012345678
420 char buf[10]; local
430 char buf[10]; local
464 char buf[10]; local
474 char* buf = (char *) malloc(10); local
483 char buf[5]; local
488 char buf[10]; local
507 char buf[10]; local
527 char buf[10]; local
534 char buf[10]; local
543 char buf[10]; local
549 char buf[20]; local
603 char buf[10]; local
616 char buf[10]; local
629 char buf[1]; local
635 char buf[1]; local
641 char buf[1]; local
649 char buf[1]; local
657 char buf[1] = {0}; local
665 char buf[1] = {0}; local
673 char buf[1]; local
681 char buf[1] = {0}; local
689 char buf[1]; local
697 char buf[1] = {0}; local
705 char buf[1]; local
711 char buf[1]; local
720 char buf[10]; local
739 char buf[10]; local
758 char buf[10]; local
776 char buf[10]; local
794 char buf[10]; local
813 char buf[10]; local
833 char buf[10]; local
852 char buf[10]; local
949 char buf[10]; local
970 char buf[10]; local
979 char buf[10]; local
988 char buf[10]; local
1010 char buf[BUFSIZ]; local
1023 pollfd buf[1] = {{0, POLLIN, 0}}; local
1030 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 Dstdio_test.cpp74 char buf[16]; local
75 char* s = fgets(buf, sizeof(buf), fp);
98 char buf[7]; local
99 ASSERT_EQ(buf, fgets(buf, sizeof(buf), tfile));
100 ASSERT_STREQ("hello\n", buf);
102 ASSERT_EQ(NULL, fgets(buf, sizeof(buf), tfil
250 char buf[32]; local
256 char buf[BUFSIZ]; local
262 char buf[BUFSIZ]; local
269 char buf[BUFSIZ]; local
283 char buf[32]; local
294 char buf[BUFSIZ]; local
395 T buf[BUFSIZ]; local
439 char buf[BUFSIZ]; local
445 char buf[BUFSIZ]; local
451 char buf[BUFSIZ]; local
461 char buf[BUFSIZ]; local
471 char buf[BUFSIZ]; local
477 char buf[BUFSIZ]; local
483 char buf[BUFSIZ]; local
493 char buf[BUFSIZ]; local
518 char buf[BUFSIZ]; local
539 char buf[PATH_MAX]; local
557 char buf[128]; local
598 char buf[16]; local
800 char buf[16]; local
834 char buf[16]; local
935 char buf[65*1024]; local
1073 char buf[6] = {0}; local
1201 char buf[BUFSIZ]; local
[all...]
H A Dinttypes_test.cpp24 char buf[512]; local
29 snprintf(buf, sizeof(buf), "%08" PRIdPTR, i);
30 snprintf(buf, sizeof(buf), "%08" PRIiPTR, i);
31 snprintf(buf, sizeof(buf), "%08" PRIoPTR, i);
32 snprintf(buf, sizeof(buf), "%08" PRIuPTR, u);
33 snprintf(buf, sizeo
[all...]
H A Dmntent_test.cpp30 char buf[BUFSIZ]; local
31 while (getmntent_r(fp, &entry, buf, sizeof(buf)) != NULL) {
/bionic/libc/upstream-openbsd/lib/libc/stdio/
H A Dsetbuf.c38 setbuf(FILE *fp, char *buf) argument
40 (void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
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 Dgetline.c34 getline(char **__restrict buf, size_t *__restrict buflen, FILE *__restrict fp) argument
36 return getdelim(buf, buflen, '\n', fp);
H A Dsetbuffer.c37 setbuffer(FILE *fp, char *buf, int size) argument
40 (void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, size);
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) { argument
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 D__getcwd_chk.cpp34 extern char* __getcwd_chk(char* buf, size_t len, size_t buflen) { argument
39 return getcwd(buf, len);
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) { argument
32 return sendto(socket, buf, len, flags, NULL, 0);
H A Dmntent.cpp43 mntent* getmntent_r(FILE* fp, struct mntent* e, char* buf, int buf_len) { argument
45 while (fgets(buf, buf_len, fp) != NULL) {
49 if (sscanf(buf, " %n%*s%n %n%*s%n %n%*s%n %n%*s%n %d %d",
52 e->mnt_fsname = &buf[fsname0];
53 buf[fsname1] = '\0';
55 e->mnt_dir = &buf[dir0];
56 buf[dir1] = '\0';
58 e->mnt_type = &buf[type0];
59 buf[type1] = '\0';
61 e->mnt_opts = &buf[opts
[all...]
H A D__fread_chk.cpp34 extern "C" size_t __fread_chk(void * __restrict buf, size_t size, size_t count, argument
39 return fread(buf, size, count, stream);
46 return fread(buf, size, count, stream);
H A D__fwrite_chk.cpp34 extern "C" size_t __fwrite_chk(const void * __restrict buf, size_t size, size_t count, argument
39 return fwrite(buf, size, count, stream);
46 return fwrite(buf, size, count, stream);
/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...]

Completed in 3939 milliseconds

123456