Home
last modified time | relevance | path

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

12345678910>>...246

/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/flatbuffers/go/
Dencode.go22 func GetByte(buf []byte) byte {
23 return byte(GetUint8(buf))
27 func GetBool(buf []byte) bool {
28 return buf[0] == 1
32 func GetUint8(buf []byte) (n uint8) {
33 n = uint8(buf[0])
38 func GetUint16(buf []byte) (n uint16) {
39 _ = buf[1] // Force one bounds check. See: golang.org/issue/14808
40 n |= uint16(buf[0])
41 n |= uint16(buf[1]) << 8
[all …]
/external/libchrome/base/strings/
Dsafe_sprintf_unittest.cc31 char buf[2] = { 'X', 'X' }; in TEST() local
34 EXPECT_EQ(-1, SafeSNPrintf(buf, static_cast<size_t>(-1), "")); in TEST()
35 EXPECT_EQ('X', buf[0]); in TEST()
36 EXPECT_EQ('X', buf[1]); in TEST()
39 EXPECT_EQ(-1, SafeSNPrintf(buf, 0, "")); in TEST()
40 EXPECT_EQ('X', buf[0]); in TEST()
41 EXPECT_EQ('X', buf[1]); in TEST()
44 EXPECT_EQ(0, SafeSNPrintf(buf, 1, "")); in TEST()
45 EXPECT_EQ(0, buf[0]); in TEST()
46 EXPECT_EQ('X', buf[1]); in TEST()
[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] __attribute__((aligned(8))); 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/openssh/
Dsshbuf.c32 sshbuf_check_sanity(const struct sshbuf *buf) in sshbuf_check_sanity() argument
35 if (__predict_false(buf == NULL || in sshbuf_check_sanity()
36 (!buf->readonly && buf->d != buf->cd) || in sshbuf_check_sanity()
37 buf->refcount < 1 || buf->refcount > SSHBUF_REFS_MAX || in sshbuf_check_sanity()
38 buf->cd == NULL || in sshbuf_check_sanity()
39 (buf->dont_free && (buf->readonly || buf->parent != NULL)) || in sshbuf_check_sanity()
40 buf->max_size > SSHBUF_SIZE_MAX || in sshbuf_check_sanity()
41 buf->alloc > buf->max_size || in sshbuf_check_sanity()
42 buf->size > buf->alloc || in sshbuf_check_sanity()
43 buf->off > buf->size)) { in sshbuf_check_sanity()
[all …]
/external/mesa3d/src/util/
Du_dynarray.h53 util_dynarray_init(struct util_dynarray *buf, void *mem_ctx) in util_dynarray_init() argument
55 memset(buf, 0, sizeof(*buf)); in util_dynarray_init()
56 buf->mem_ctx = mem_ctx; in util_dynarray_init()
60 util_dynarray_fini(struct util_dynarray *buf) in util_dynarray_fini() argument
62 if (buf->data) { in util_dynarray_fini()
63 if (buf->mem_ctx) { in util_dynarray_fini()
64 ralloc_free(buf->data); in util_dynarray_fini()
66 free(buf->data); in util_dynarray_fini()
68 util_dynarray_init(buf, buf->mem_ctx); in util_dynarray_fini()
73 util_dynarray_clear(struct util_dynarray *buf) in util_dynarray_clear() argument
[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()
95 byte[] buf = dexBuf.buf; in peekSleb128Size()
97 result = buf[end++] & 0xff; in peekSleb128Size()
99 currentByteValue = buf[end++] & 0xff; in peekSleb128Size()
101 currentByteValue = buf[end++] & 0xff; in peekSleb128Size()
[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/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/adhd/cras/src/common/
Dbyte_buffer.h25 struct byte_buffer *buf; in byte_buffer_create() local
26 buf = (struct byte_buffer *) in byte_buffer_create()
28 if (!buf) in byte_buffer_create()
29 return buf; in byte_buffer_create()
30 buf->max_size = buffer_size_bytes; in byte_buffer_create()
31 buf->used_size = buffer_size_bytes; in byte_buffer_create()
32 return buf; in byte_buffer_create()
35 static inline void byte_buffer_set_used_size(struct byte_buffer *buf, in byte_buffer_set_used_size() argument
38 buf->used_size = MIN(used_size, buf->max_size); in byte_buffer_set_used_size()
42 static inline void byte_buffer_destroy(struct byte_buffer **buf) in byte_buffer_destroy() argument
[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/python/cpython3/Modules/_blake2/impl/
Dblake2s-load-sse2.h19 #define LOAD_MSG_0_1(buf) buf = _mm_set_epi32(m6,m4,m2,m0) argument
20 #define LOAD_MSG_0_2(buf) buf = _mm_set_epi32(m7,m5,m3,m1) argument
21 #define LOAD_MSG_0_3(buf) buf = _mm_set_epi32(m14,m12,m10,m8) argument
22 #define LOAD_MSG_0_4(buf) buf = _mm_set_epi32(m15,m13,m11,m9) argument
23 #define LOAD_MSG_1_1(buf) buf = _mm_set_epi32(m13,m9,m4,m14) argument
24 #define LOAD_MSG_1_2(buf) buf = _mm_set_epi32(m6,m15,m8,m10) argument
25 #define LOAD_MSG_1_3(buf) buf = _mm_set_epi32(m5,m11,m0,m1) argument
26 #define LOAD_MSG_1_4(buf) buf = _mm_set_epi32(m3,m7,m2,m12) argument
27 #define LOAD_MSG_2_1(buf) buf = _mm_set_epi32(m15,m5,m12,m11) argument
28 #define LOAD_MSG_2_2(buf) buf = _mm_set_epi32(m13,m2,m0,m8) argument
[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/libxkbcommon/xkbcommon/src/xkbcomp/
Dkeymap-dump.c57 struct buf { struct
58 char *buf; argument
64 do_realloc(struct buf *buf, size_t at_least) in do_realloc() argument
68 buf->alloc += BUF_CHUNK_SIZE; in do_realloc()
70 buf->alloc += at_least; in do_realloc()
72 new = realloc(buf->buf, buf->alloc); in do_realloc()
76 buf->buf = new; in do_realloc()
81 check_write_buf(struct buf *buf, const char *fmt, ...) in check_write_buf() argument
87 available = buf->alloc - buf->size; in check_write_buf()
89 printed = vsnprintf(buf->buf + buf->size, available, fmt, args); in check_write_buf()
[all …]
/external/icu/icu4c/source/tools/toolutil/
Ducbuf.cpp163 ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){ in ucbuf_fillucbuf() argument
174 pTarget = buf->buffer; in ucbuf_fillucbuf()
176 if(buf->currentPos<buf->bufLimit){ in ucbuf_fillucbuf()
177 offset = (int32_t)(buf->bufLimit-buf->currentPos); in ucbuf_fillucbuf()
178 memmove(buf->buffer,buf->currentPos,offset* sizeof(UChar)); in ucbuf_fillucbuf()
184 if(buf->isBuffered){ in ucbuf_fillucbuf()
187 inputRead=T_FileStream_read(buf->in,cbuf,cbufSize-offset); in ucbuf_fillucbuf()
188 buf->remaining-=inputRead; in ucbuf_fillucbuf()
191 cbufSize = T_FileStream_size(buf->in); in ucbuf_fillucbuf()
197 inputRead= T_FileStream_read(buf->in,cbuf,cbufSize); in ucbuf_fillucbuf()
[all …]
/external/robolectric-shadows/resources/src/main/java/org/robolectric/res/android/
DResourceTypes.java60 private final ByteBuffer buf; field in ResourceTypes.WithOffset
63 WithOffset(ByteBuffer buf, int offset) { in WithOffset() argument
64 this.buf = buf; in WithOffset()
69 return buf; in myBuf()
113 public ResChunk_header(ByteBuffer buf, int offset) { in ResChunk_header() argument
114 super(buf, offset); in ResChunk_header()
115 this.type = buf.getShort(offset); in ResChunk_header()
116 this.headerSize = buf.getShort(offset + 2); in ResChunk_header()
117 this.size = buf.getInt(offset + 4); in ResChunk_header()
120 public static void write(ByteBuffer buf, short type, Runnable header, Runnable contents) { in write() argument
[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/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/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 …]
/external/antlr/tool/src/main/java/org/antlr/tool/
DGrammarReport.java259 StringBuilder buf = new StringBuilder(); in toNotifyString() local
267 if (i>0) buf.append('\t'); in toNotifyString()
268 buf.append(s); in toNotifyString()
275 return buf.toString(); in toNotifyString()
279 StringBuilder buf = new StringBuilder(); in getBacktrackingReport() local
280 buf.append("Backtracking report:"); in getBacktrackingReport()
281 buf.append(newline); in getBacktrackingReport()
282 buf.append("Number of decisions that backtrack: "); in getBacktrackingReport()
283 buf.append(grammar.decisionsWhoseDFAsUsesSynPreds.size()); in getBacktrackingReport()
284 buf.append(newline); in getBacktrackingReport()
[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 …]
/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/swiftshader/third_party/llvm-7.0/llvm/unittests/ADT/
DSmallPtrSetTest.cpp22 int buf[8]; in TEST() local
24 buf[i] = 0; in TEST()
26 SmallPtrSet<int *, 4> s1 = {&buf[0], &buf[1]}; in TEST()
28 (s2 = s1).insert(&buf[2]); in TEST()
31 (s2 = static_cast<SmallPtrSet<int *, 4> &>(s2)).insert(&buf[3]); in TEST()
37 EXPECT_TRUE(s1.count(&buf[i])); in TEST()
39 EXPECT_FALSE(s1.count(&buf[i])); in TEST()
43 (s2 = {&buf[6], &buf[7], &buf[6]}).insert({&buf[5], &buf[4]}); in TEST()
46 EXPECT_FALSE(s2.count(&buf[i])); in TEST()
48 EXPECT_TRUE(s2.count(&buf[i])); in TEST()
[all …]
/external/libaom/libaom/examples/
Dinspect.c344 char *buf = buffer; in put_num() local
347 buf[i++] = prefix; in put_num()
350 buf[i++] = '0'; in put_num()
358 buf[i++] = '0' + (num % 10); in put_num()
362 buf[i++] = '-'; in put_num()
366 int t = buf[s]; in put_num()
367 buf[s] = buf[e]; in put_num()
368 buf[e] = t; in put_num()
374 buf[i++] = suffix; in put_num()
380 char *buf = buffer; in put_map() local
[all …]

12345678910>>...246