Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 4159) sorted by relevance

12345678910>>...167

/external/libxml2/
Dbuf.c60 #define UPDATE_COMPAT(buf) \ argument
61 if (buf->size < INT_MAX) buf->compat_size = buf->size; \
62 else buf->compat_size = INT_MAX; \
63 if (buf->use < INT_MAX) buf->compat_use = buf->use; \
64 else buf->compat_use = INT_MAX;
71 #define CHECK_COMPAT(buf) \ argument
72 if (buf->size != (size_t) buf->compat_size) \
73 if (buf->compat_size < INT_MAX) \
74 buf->size = buf->compat_size; \
75 if (buf->use != (size_t) buf->compat_use) \
[all …]
/external/libunwind/tests/
DLrs-race.c49 void *buf[20]; in foo_0() local
52 if ((n = unw_backtrace (buf, 20)) < 3) in foo_0()
59 void *buf[20]; in foo_1() local
62 if ((n = unw_backtrace (buf, 20)) < 3) in foo_1()
69 void *buf[20]; in foo_2() local
72 if ((n = unw_backtrace (buf, 20)) < 3) in foo_2()
79 void *buf[20]; in foo_3() local
82 if ((n = unw_backtrace (buf, 20)) < 3) in foo_3()
89 void *buf[20]; in foo_4() local
92 if ((n = unw_backtrace (buf, 20)) < 3) in foo_4()
[all …]
/external/compiler-rt/test/msan/Linux/
Dsyscalls.cc22 char buf[1000]; in main() local
25 memset(buf, 0, sizeof(buf)); in main()
26 __msan_unpoison(buf, sizeof(buf)); in main()
27 __sanitizer_syscall_pre_recvmsg(0, buf, 0); in main()
28 __sanitizer_syscall_pre_rt_sigpending(buf, kTen); in main()
29 __sanitizer_syscall_pre_getdents(0, buf, kTen); in main()
30 __sanitizer_syscall_pre_getdents64(0, buf, kTen); in main()
32 __msan_unpoison(buf, sizeof(buf)); in main()
33 __sanitizer_syscall_post_recvmsg(0, 0, buf, 0); in main()
34 __sanitizer_syscall_post_rt_sigpending(-1, buf, kTen); in main()
[all …]
/external/webrtc/webrtc/base/
Dbyteorder_unittest.cc20 uint8_t buf[8] = {0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u}; in TEST() local
21 Set8(buf, 0, 0xfb); in TEST()
22 Set8(buf, 1, 0x12); in TEST()
23 EXPECT_EQ(0xfb, buf[0]); in TEST()
24 EXPECT_EQ(0x12, buf[1]); in TEST()
25 SetBE16(buf, 0x1234); in TEST()
26 EXPECT_EQ(0x12, buf[0]); in TEST()
27 EXPECT_EQ(0x34, buf[1]); in TEST()
28 SetLE16(buf, 0x1234); in TEST()
29 EXPECT_EQ(0x34, buf[0]); in TEST()
[all …]
/external/wpa_supplicant_8/src/p2p/
Dp2p_build.c18 void p2p_buf_add_action_hdr(struct wpabuf *buf, u8 subtype, u8 dialog_token) in p2p_buf_add_action_hdr() argument
20 wpabuf_put_u8(buf, WLAN_ACTION_VENDOR_SPECIFIC); in p2p_buf_add_action_hdr()
21 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_action_hdr()
23 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_action_hdr()
24 wpabuf_put_u8(buf, dialog_token); in p2p_buf_add_action_hdr()
29 void p2p_buf_add_public_action_hdr(struct wpabuf *buf, u8 subtype, in p2p_buf_add_public_action_hdr() argument
32 wpabuf_put_u8(buf, WLAN_ACTION_PUBLIC); in p2p_buf_add_public_action_hdr()
33 wpabuf_put_u8(buf, WLAN_PA_VENDOR_SPECIFIC); in p2p_buf_add_public_action_hdr()
34 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_public_action_hdr()
36 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_public_action_hdr()
[all …]
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/dexbacked/
DBaseDexReader.java55 byte[] buf = dexBuf.buf; in readSleb128()
57 result = buf[end++] & 0xff; in readSleb128()
61 currentByteValue = buf[end++] & 0xff; in readSleb128()
66 currentByteValue = buf[end++] & 0xff; in readSleb128()
71 currentByteValue = buf[end++] & 0xff; in readSleb128()
76 currentByteValue = buf[end++] & 0xff; in readSleb128()
99 byte[] buf = dexBuf.buf; in readUleb128()
101 result = buf[end++] & 0xff; in readUleb128()
103 currentByteValue = buf[end++] & 0xff; in readUleb128()
106 currentByteValue = buf[end++] & 0xff; in readUleb128()
[all …]
DBaseDexBuffer.java39 @Nonnull /* package private */ final byte[] buf; field in BaseDexBuffer
42 public BaseDexBuffer(@Nonnull byte[] buf) { in BaseDexBuffer() argument
43 this(buf, 0); in BaseDexBuffer()
45 public BaseDexBuffer(@Nonnull byte[] buf, int offset) { in BaseDexBuffer() argument
46 this.buf = buf; in BaseDexBuffer()
51 byte[] buf = this.buf; in readSmallUint()
53 int result = (buf[offset] & 0xff) | in readSmallUint()
54 ((buf[offset+1] & 0xff) << 8) | in readSmallUint()
55 ((buf[offset+2] & 0xff) << 16) | in readSmallUint()
56 ((buf[offset+3]) << 24); in readSmallUint()
[all …]
/external/curl/lib/
Dcurl_endian.c40 unsigned short Curl_read16_le(unsigned char *buf) in Curl_read16_le() argument
42 return (unsigned short)(((unsigned short)buf[0]) | in Curl_read16_le()
43 ((unsigned short)buf[1] << 8)); in Curl_read16_le()
59 unsigned int Curl_read32_le(unsigned char *buf) in Curl_read32_le() argument
61 return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8) | in Curl_read32_le()
62 ((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24); in Curl_read32_le()
80 unsigned long long Curl_read64_le(unsigned char *buf) in Curl_read64_le() argument
82 return ((unsigned long long)buf[0]) | in Curl_read64_le()
83 ((unsigned long long)buf[1] << 8) | in Curl_read64_le()
84 ((unsigned long long)buf[2] << 16) | in Curl_read64_le()
[all …]
/external/wpa_supplicant_8/src/utils/
Dwpabuf.c22 static struct wpabuf_trace * wpabuf_get_trace(const struct wpabuf *buf) in wpabuf_get_trace() argument
25 ((const u8 *) buf - sizeof(struct wpabuf_trace)); in wpabuf_get_trace()
30 static void wpabuf_overflow(const struct wpabuf *buf, size_t len) in wpabuf_overflow() argument
33 struct wpabuf_trace *trace = wpabuf_get_trace(buf); in wpabuf_overflow()
40 buf, (unsigned long) buf->size, (unsigned long) buf->used, in wpabuf_overflow()
49 struct wpabuf *buf = *_buf; in wpabuf_resize() local
54 if (buf == NULL) { in wpabuf_resize()
60 trace = wpabuf_get_trace(buf); in wpabuf_resize()
69 if (buf->used + add_len > buf->size) { in wpabuf_resize()
71 if (buf->flags & WPABUF_FLAG_EXT_DATA) { in wpabuf_resize()
[all …]
/external/mesa3d/src/gallium/auxiliary/util/
Du_dynarray.h47 util_dynarray_init(struct util_dynarray *buf) in util_dynarray_init() argument
49 memset(buf, 0, sizeof(*buf)); in util_dynarray_init()
53 util_dynarray_fini(struct util_dynarray *buf) in util_dynarray_fini() argument
55 if(buf->data) in util_dynarray_fini()
57 FREE(buf->data); in util_dynarray_fini()
58 util_dynarray_init(buf); in util_dynarray_fini()
64 util_dynarray_resize(struct util_dynarray *buf, unsigned newsize) in util_dynarray_resize() argument
67 if(newsize > buf->capacity) in util_dynarray_resize()
69 unsigned newcap = buf->capacity << 1; in util_dynarray_resize()
72 buf->data = REALLOC(buf->data, buf->capacity, newcap); in util_dynarray_resize()
[all …]
/external/icu/icu4c/source/tools/toolutil/
Ducbuf.c161 ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){ in ucbuf_fillucbuf() argument
172 pTarget = buf->buffer; in ucbuf_fillucbuf()
174 if(buf->currentPos<buf->bufLimit){ in ucbuf_fillucbuf()
175 offset = (int32_t)(buf->bufLimit-buf->currentPos); in ucbuf_fillucbuf()
176 memmove(buf->buffer,buf->currentPos,offset* sizeof(UChar)); in ucbuf_fillucbuf()
182 if(buf->isBuffered){ in ucbuf_fillucbuf()
185 inputRead=T_FileStream_read(buf->in,cbuf,cbufSize-offset); in ucbuf_fillucbuf()
186 buf->remaining-=inputRead; in ucbuf_fillucbuf()
189 cbufSize = T_FileStream_size(buf->in); in ucbuf_fillucbuf()
195 inputRead= T_FileStream_read(buf->in,cbuf,cbufSize); in ucbuf_fillucbuf()
[all …]
/external/compiler-rt/lib/sanitizer_common/tests/
Dsanitizer_printf_test.cc23 char buf[1024]; in TEST() local
24 uptr len = internal_snprintf(buf, sizeof(buf), in TEST()
30 EXPECT_EQ(len, strlen(buf)); in TEST()
35 EXPECT_STREQ(expectedString.c_str(), buf); in TEST()
39 char buf[] = "123456789"; in TEST() local
40 uptr len = internal_snprintf(buf, 4, "%s", "abcdef"); // NOLINT in TEST()
42 EXPECT_STREQ("abc", buf); in TEST()
43 EXPECT_EQ(buf[3], 0); in TEST()
44 EXPECT_EQ(buf[4], '5'); in TEST()
45 EXPECT_EQ(buf[5], '6'); in TEST()
[all …]
/external/mockito/cglib-and-asm/src/org/mockito/asm/util/
DASMifierMethodVisitor.java59 buf.setLength(0); in visitAnnotationDefault()
60 buf.append("{\n").append("av0 = mv.visitAnnotationDefault();\n"); in visitAnnotationDefault()
61 text.add(buf.toString()); in visitAnnotationDefault()
73 buf.setLength(0); in visitParameterAnnotation()
74 buf.append("{\n") in visitParameterAnnotation()
79 buf.append(", ").append(visible).append(");\n"); in visitParameterAnnotation()
80 text.add(buf.toString()); in visitParameterAnnotation()
98 buf.setLength(0); in visitFrame()
105 buf.append("mv.visitFrame(Opcodes.F_NEW, "); in visitFrame()
107 buf.append("mv.visitFrame(Opcodes.F_FULL, "); in visitFrame()
[all …]
DASMifierClassVisitor.java236 buf.setLength(0); in visit()
237 buf.append("cw.visit("); in visit()
240 buf.append("V1_1"); in visit()
243 buf.append("V1_2"); in visit()
246 buf.append("V1_3"); in visit()
249 buf.append("V1_4"); in visit()
252 buf.append("V1_5"); in visit()
255 buf.append("V1_6"); in visit()
258 buf.append(version); in visit()
261 buf.append(", "); in visit()
[all …]
/external/google-breakpad/src/third_party/libdisasm/
Dx86_format.c18 #define STRNCAT( buf, str, len ) do { \ argument
19 int _i = strlen(str), _blen = strlen(buf), _len = len - 1; \
21 strncat( buf, str, _len ); \
23 buf[_blen+_len] = '\0'; \
31 #define STRNCATF( buf, fmt, data, len ) do { \ argument
35 STRNCAT( buf, _tmp, len ); \
42 STRNCATF( buf, "-0x%" PRIX32, -ea->disp, len ); \
44 STRNCATF( buf, "0x%" PRIX32, ea->disp, len ); \
57 static int format_insn_prefix_str( enum x86_insn_prefix prefix, char *buf, in format_insn_prefix_str() argument
63 if ( prefix & 1 ) { STRNCAT( buf, prefix_strings[1], len ); } in format_insn_prefix_str()
[all …]
/external/valgrind/none/tests/s390x/
Dmvcl.c146 print_buf(const char *prefix, char *buf, uint32_t len) in print_buf() argument
153 putchar(buf[i]); in print_buf()
174 uint8_t byte, buf[10], small[5], i; in main() local
183 run_test(NULL, 0, buf, sizeof buf, 0x00); in main()
184 run_test(NULL, 0, buf, sizeof buf, 0xFF); in main()
189 memset(buf, 'x', sizeof buf); in main()
190 run_test(buf, sizeof buf, NULL, 0, 'a'); in main()
198 memset(buf, 'x', sizeof buf); in main()
199 for (i = 0; i <= sizeof buf; ++i) in main()
200 run_test(buf, i, buf, sizeof buf, 'a'); in main()
[all …]
/external/mesa3d/src/gallium/auxiliary/pipebuffer/
Dpb_bufmgr_ondemand.c74 pb_ondemand_buffer(struct pb_buffer *buf) in pb_ondemand_buffer() argument
76 assert(buf); in pb_ondemand_buffer()
77 if (!buf) in pb_ondemand_buffer()
79 assert(buf->vtbl == &pb_ondemand_buffer_vtbl); in pb_ondemand_buffer()
80 return (struct pb_ondemand_buffer *)buf; in pb_ondemand_buffer()
94 struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf); in pb_ondemand_buffer_destroy() local
96 pb_reference(&buf->buffer, NULL); in pb_ondemand_buffer_destroy()
98 align_free(buf->data); in pb_ondemand_buffer_destroy()
100 FREE(buf); in pb_ondemand_buffer_destroy()
108 struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf); in pb_ondemand_buffer_map() local
[all …]
Dpb_bufmgr_debug.c103 pb_debug_buffer(struct pb_buffer *buf) in pb_debug_buffer() argument
105 assert(buf); in pb_debug_buffer()
106 return (struct pb_debug_buffer *)buf; in pb_debug_buffer()
157 pb_debug_buffer_fill(struct pb_debug_buffer *buf) in pb_debug_buffer_fill() argument
161 map = pb_map(buf->buffer, PB_USAGE_CPU_WRITE, NULL); in pb_debug_buffer_fill()
164 fill_random_pattern(map, buf->underflow_size); in pb_debug_buffer_fill()
165 fill_random_pattern(map + buf->underflow_size + buf->base.size, in pb_debug_buffer_fill()
166 buf->overflow_size); in pb_debug_buffer_fill()
167 pb_unmap(buf->buffer); in pb_debug_buffer_fill()
178 pb_debug_buffer_check(struct pb_debug_buffer *buf) in pb_debug_buffer_check() argument
[all …]
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/
DGrammarReport.java260 StringBuffer buf = new StringBuffer(); in toNotifyString() local
268 if (i>0) buf.append('\t'); in toNotifyString()
269 buf.append(s); in toNotifyString()
276 return buf.toString(); in toNotifyString()
280 StringBuffer buf = new StringBuffer(); in getBacktrackingReport() local
281 buf.append("Backtracking report:"); in getBacktrackingReport()
282 buf.append(newline); in getBacktrackingReport()
283 buf.append("Number of decisions that backtrack: "); in getBacktrackingReport()
284 buf.append(grammar.decisionsWhoseDFAsUsesSynPreds.size()); in getBacktrackingReport()
285 buf.append(newline); in getBacktrackingReport()
[all …]
/external/toybox/toys/pending/
Dipcs.c45 struct semid_ds *buf; member
52 struct msqid_ds buf; in show_msg_id() local
55 if ((ret = msgctl(TT.id, IPC_STAT, &buf)) < 0) { in show_msg_id()
60 #define ipcperm buf.msg_perm in show_msg_id()
66 (long) buf.msg_cbytes, (long) buf.msg_qbytes, in show_msg_id()
67 (long) buf.msg_qnum, buf.msg_lspid, buf.msg_lrpid); in show_msg_id()
70 buf.msg_stime ? ctime(&buf.msg_stime) : "Not set", in show_msg_id()
71 buf.msg_rtime ? ctime(&buf.msg_rtime) : "Not set", in show_msg_id()
72 buf.msg_ctime ? ctime(&buf.msg_ctime) : "Not set"); in show_msg_id()
78 struct semid_ds buf; in show_sem_id() local
[all …]
/external/minijail/
Dlibminijail_unittest.c20 void *consumebytes(size_t length, char **buf, size_t *buflength);
21 char *consumestr(char **buf, size_t *buflength);
31 char buf[1024]; in TEST() local
32 size_t len = sizeof(buf); in TEST()
33 char *pos = &buf[0]; in TEST()
35 EXPECT_EQ(&buf[0], pos); in TEST()
36 EXPECT_EQ(sizeof(buf), len); in TEST()
40 char buf[1024]; in TEST() local
41 size_t len = sizeof(buf); in TEST()
42 char *pos = &buf[0]; in TEST()
[all …]
/external/wpa_supplicant_8/src/common/
Dgas.c20 struct wpabuf *buf; in gas_build_req() local
22 buf = wpabuf_alloc(100 + size); in gas_build_req()
23 if (buf == NULL) in gas_build_req()
26 wpabuf_put_u8(buf, WLAN_ACTION_PUBLIC); in gas_build_req()
27 wpabuf_put_u8(buf, action); in gas_build_req()
28 wpabuf_put_u8(buf, dialog_token); in gas_build_req()
30 return buf; in gas_build_req()
51 struct wpabuf *buf; in gas_build_resp() local
53 buf = wpabuf_alloc(100 + size); in gas_build_resp()
54 if (buf == NULL) in gas_build_resp()
[all …]
/external/tcpdump/
Dsmbutil.c170 const u_char *buf, int ofs, const u_char *maxbuf) in name_ptr() argument
175 p = buf + ofs; in name_ptr()
194 p = buf + l; in name_ptr()
210 const u_char *buf, int ofs, const u_char *maxbuf, char *name) in name_extract() argument
212 const u_char *p = name_ptr(ndo, buf, ofs, maxbuf); in name_extract()
250 const unsigned char *buf, int len) in print_asc() argument
254 safeputchar(ndo, buf[i]); in print_asc()
276 const unsigned char *buf, int len) in print_data() argument
284 ND_TCHECK(buf[i]); in print_data()
285 ND_PRINT((ndo, "%02X ", buf[i] & 0xff)); in print_data()
[all …]
/external/tlsdate/src/
Dproxy-polarssl.c39 unsigned char buf[NI_MAXHOST + 16]; in socks4a_connect() local
59 buf[0] = 0x04; in socks4a_connect()
60 buf[1] = 0x01; in socks4a_connect()
63 memcpy(buf + 2, &port_n, sizeof(port_n)); in socks4a_connect()
66 buf[4] = 0x00; in socks4a_connect()
67 buf[5] = 0x00; in socks4a_connect()
68 buf[6] = 0x00; in socks4a_connect()
69 buf[7] = 0x01; in socks4a_connect()
72 buf[8] = 0x00; in socks4a_connect()
75 memcpy(buf + sz, ctx->host, strlen(ctx->host) + 1); in socks4a_connect()
[all …]
/external/llvm/unittests/ADT/
DSmallPtrSetTest.cpp20 int buf[8]; in TEST() local
22 buf[i] = 0; in TEST()
25 s1.insert(&buf[0]); in TEST()
26 s1.insert(&buf[1]); in TEST()
29 (s2 = s1).insert(&buf[2]); in TEST()
32 (s2 = s2).insert(&buf[3]); in TEST()
38 EXPECT_TRUE(s1.count(&buf[i])); in TEST()
40 EXPECT_FALSE(s1.count(&buf[i])); in TEST()
45 int buf[8]; in TEST() local
46 for(i=0; i<8; ++i) buf[i]=0; in TEST()
[all …]

12345678910>>...167