/external/libxml2/ |
D | buf.c | 59 #define UPDATE_COMPAT(buf) \ argument 60 if (buf->size < INT_MAX) buf->compat_size = buf->size; \ 61 else buf->compat_size = INT_MAX; \ 62 if (buf->use < INT_MAX) buf->compat_use = buf->use; \ 63 else buf->compat_use = INT_MAX; 70 #define CHECK_COMPAT(buf) \ argument 71 if (buf->size != (size_t) buf->compat_size) \ 72 if (buf->compat_size < INT_MAX) \ 73 buf->size = buf->compat_size; \ 74 if (buf->use != (size_t) buf->compat_use) \ [all …]
|
/external/libunwind/tests/ |
D | Lrs-race.c | 49 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/chromium_org/base/strings/ |
D | safe_sprintf_unittest.cc | 27 char buf[2] = { 'X', 'X' }; in TEST() local 30 EXPECT_EQ(-1, SafeSNPrintf(buf, static_cast<size_t>(-1), "")); in TEST() 31 EXPECT_EQ('X', buf[0]); in TEST() 32 EXPECT_EQ('X', buf[1]); in TEST() 35 EXPECT_EQ(-1, SafeSNPrintf(buf, 0, "")); in TEST() 36 EXPECT_EQ('X', buf[0]); in TEST() 37 EXPECT_EQ('X', buf[1]); in TEST() 40 EXPECT_EQ(0, SafeSNPrintf(buf, 1, "")); in TEST() 41 EXPECT_EQ(0, buf[0]); in TEST() 42 EXPECT_EQ('X', buf[1]); in TEST() [all …]
|
/external/compiler-rt/test/msan/Linux/ |
D | syscalls.cc | 21 char buf[1000]; in main() local 24 memset(buf, 0, sizeof(buf)); in main() 25 __msan_unpoison(buf, sizeof(buf)); in main() 26 __sanitizer_syscall_pre_recvmsg(0, buf, 0); in main() 27 __sanitizer_syscall_pre_rt_sigpending(buf, kTen); in main() 28 __sanitizer_syscall_pre_getdents(0, buf, kTen); in main() 29 __sanitizer_syscall_pre_getdents64(0, buf, kTen); in main() 31 __msan_unpoison(buf, sizeof(buf)); in main() 32 __sanitizer_syscall_post_recvmsg(0, 0, buf, 0); in main() 33 __sanitizer_syscall_post_rt_sigpending(-1, buf, kTen); in main() [all …]
|
/external/chromium_org/third_party/webrtc/base/ |
D | byteorder_unittest.cc | 20 uint8 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 …]
|
D | buffer_unittest.cc | 21 Buffer buf; in TEST() local 22 EXPECT_EQ(0U, buf.length()); in TEST() 23 EXPECT_EQ(0U, buf.capacity()); in TEST() 24 EXPECT_EQ(Buffer(), buf); in TEST() 28 Buffer buf(NULL, 0, 256U); in TEST() local 29 EXPECT_EQ(0U, buf.length()); in TEST() 30 EXPECT_EQ(256U, buf.capacity()); in TEST() 31 EXPECT_EQ(Buffer(), buf); in TEST() 35 Buffer buf(kTestData, sizeof(kTestData)); in TEST() local 36 EXPECT_EQ(sizeof(kTestData), buf.length()); in TEST() [all …]
|
/external/wpa_supplicant_8/src/p2p/ |
D | p2p_build.c | 17 void p2p_buf_add_action_hdr(struct wpabuf *buf, u8 subtype, u8 dialog_token) in p2p_buf_add_action_hdr() argument 19 wpabuf_put_u8(buf, WLAN_ACTION_VENDOR_SPECIFIC); in p2p_buf_add_action_hdr() 20 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_action_hdr() 22 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_action_hdr() 23 wpabuf_put_u8(buf, dialog_token); in p2p_buf_add_action_hdr() 28 void p2p_buf_add_public_action_hdr(struct wpabuf *buf, u8 subtype, in p2p_buf_add_public_action_hdr() argument 31 wpabuf_put_u8(buf, WLAN_ACTION_PUBLIC); in p2p_buf_add_public_action_hdr() 32 wpabuf_put_u8(buf, WLAN_PA_VENDOR_SPECIFIC); in p2p_buf_add_public_action_hdr() 33 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_public_action_hdr() 35 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/ |
D | BaseDexReader.java | 56 byte[] buf = dexBuf.buf; in readSleb128() 58 result = buf[end++] & 0xff; in readSleb128() 62 currentByteValue = buf[end++] & 0xff; in readSleb128() 67 currentByteValue = buf[end++] & 0xff; in readSleb128() 72 currentByteValue = buf[end++] & 0xff; in readSleb128() 77 currentByteValue = buf[end++] & 0xff; in readSleb128() 100 byte[] buf = dexBuf.buf; in readUleb128() 102 result = buf[end++] & 0xff; in readUleb128() 104 currentByteValue = buf[end++] & 0xff; in readUleb128() 107 currentByteValue = buf[end++] & 0xff; in readUleb128() [all …]
|
D | BaseDexBuffer.java | 39 @Nonnull /* package private */ final byte[] buf; field in BaseDexBuffer 41 public BaseDexBuffer(@Nonnull byte[] buf) { in BaseDexBuffer() argument 42 this.buf = buf; in BaseDexBuffer() 46 byte[] buf = this.buf; in readSmallUint() 47 int result = (buf[offset] & 0xff) | in readSmallUint() 48 ((buf[offset+1] & 0xff) << 8) | in readSmallUint() 49 ((buf[offset+2] & 0xff) << 16) | in readSmallUint() 50 ((buf[offset+3]) << 24); in readSmallUint() 58 byte[] buf = this.buf; in readOptionalUint() 59 int result = (buf[offset] & 0xff) | in readOptionalUint() [all …]
|
/external/chromium_org/third_party/mesa/src/src/gallium/auxiliary/util/ |
D | u_dynarray.h | 47 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/mesa3d/src/gallium/auxiliary/util/ |
D | u_dynarray.h | 47 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/wpa_supplicant_8/src/utils/ |
D | wpabuf.c | 22 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/compiler-rt/lib/sanitizer_common/tests/ |
D | sanitizer_printf_test.cc | 23 char buf[1024]; in TEST() local 24 uptr len = internal_snprintf(buf, sizeof(buf), in TEST() 30 EXPECT_EQ(len, strlen(buf)); in TEST() 34 "0x00000123e_string_r", buf); in TEST() 37 "0x000000000123e_string_r", buf); in TEST() 42 char buf[] = "123456789"; in TEST() local 43 uptr len = internal_snprintf(buf, 4, "%s", "abcdef"); // NOLINT in TEST() 45 EXPECT_STREQ("abc", buf); in TEST() 46 EXPECT_EQ(buf[3], 0); in TEST() 47 EXPECT_EQ(buf[4], '5'); in TEST() [all …]
|
/external/mockito/cglib-and-asm/src/org/mockito/asm/util/ |
D | ASMifierMethodVisitor.java | 59 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 …]
|
D | ASMifierClassVisitor.java | 236 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/chromium_org/third_party/icu/source/tools/toolutil/ |
D | ucbuf.c | 161 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/icu/icu4c/source/tools/toolutil/ |
D | ucbuf.c | 161 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/mesa3d/src/gallium/auxiliary/pipebuffer/ |
D | pb_bufmgr_ondemand.c | 74 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/chromium_org/third_party/mesa/src/src/gallium/auxiliary/pipebuffer/ |
D | pb_bufmgr_ondemand.c | 74 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/chromium_org/content/browser/loader/ |
D | resource_buffer_unittest.cc | 11 scoped_refptr<ResourceBuffer> buf = new ResourceBuffer(); in TEST() local 12 EXPECT_TRUE(buf->Initialize(100, 5, 10)); in TEST() 13 EXPECT_TRUE(buf->CanAllocate()); in TEST() 18 char* ptr = buf->Allocate(&size); in TEST() 21 EXPECT_TRUE(buf->CanAllocate()); in TEST() 23 EXPECT_EQ(0, buf->GetLastAllocationOffset()); in TEST() 25 buf->ShrinkLastAllocation(2); // Less than our min allocation size. in TEST() 26 EXPECT_EQ(0, buf->GetLastAllocationOffset()); in TEST() 27 EXPECT_TRUE(buf->CanAllocate()); in TEST() 33 char* ptr = buf->Allocate(&size); in TEST() [all …]
|
/external/valgrind/main/none/tests/s390x/ |
D | mvcl.c | 146 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/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/ |
D | GrammarReport.java | 260 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/wpa_supplicant_8/src/common/ |
D | gas.c | 20 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/ |
D | smbutil.c | 172 name_ptr(const u_char *buf, int ofs, const u_char *maxbuf) in name_ptr() argument 177 p = buf + ofs; in name_ptr() 196 p = buf + l; in name_ptr() 211 name_extract(const u_char *buf, int ofs, const u_char *maxbuf, char *name) in name_extract() argument 213 const u_char *p = name_ptr(buf, ofs, maxbuf); in name_extract() 249 print_asc(const unsigned char *buf, int len) in print_asc() argument 253 safeputchar(buf[i]); in print_asc() 274 print_data(const unsigned char *buf, int len) in print_data() argument 282 TCHECK(buf[i]); in print_data() 283 printf("%02X ", buf[i] & 0xff); in print_data() [all …]
|
/external/chromium_org/third_party/libevent/ |
D | buffer.c | 137 evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap) in evbuffer_add_vprintf() argument 141 size_t oldoff = buf->off; in evbuffer_add_vprintf() 146 evbuffer_expand(buf, 64); in evbuffer_add_vprintf() 148 size_t used = buf->misalign + buf->off; in evbuffer_add_vprintf() 149 buffer = (char *)buf->buffer + buf->off; in evbuffer_add_vprintf() 150 assert(buf->totallen >= used); in evbuffer_add_vprintf() 151 space = buf->totallen - used; in evbuffer_add_vprintf() 165 buf->off += sz; in evbuffer_add_vprintf() 166 if (buf->cb != NULL) in evbuffer_add_vprintf() 167 (*buf->cb)(buf, oldoff, buf->off, buf->cbarg); in evbuffer_add_vprintf() [all …]
|