/external/libxml2/ |
D | buf.c | 60 #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/libchrome/base/strings/ |
D | safe_sprintf_unittest.cc | 31 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/ |
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/compiler-rt/test/msan/Linux/ |
D | syscalls.cc | 22 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/flatbuffers/go/ |
D | encode.go | 22 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 n |= uint16(buf[0]) 40 n |= uint16(buf[1]) << 8 45 func GetUint32(buf []byte) (n uint32) { [all …]
|
/external/openssh/ |
D | sshbuf.c | 32 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/webrtc/webrtc/base/ |
D | byteorder_unittest.cc | 20 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/ |
D | p2p_build.c | 18 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/ |
D | BaseDexReader.java | 55 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 …]
|
D | BaseDexBuffer.java | 39 @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/ |
D | curl_endian.c | 40 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/ |
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/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/syslinux/core/lwip/src/api/ |
D | netbuf.c | 58 struct netbuf *buf; in netbuf_new() local 60 buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); in netbuf_new() 61 if (buf != NULL) { in netbuf_new() 62 buf->p = NULL; in netbuf_new() 63 buf->ptr = NULL; in netbuf_new() 64 ip_addr_set_any(&buf->addr); in netbuf_new() 65 buf->port = 0; in netbuf_new() 68 buf->flags = 0; in netbuf_new() 70 buf->toport_chksum = 0; in netbuf_new() 72 ip_addr_set_any(&buf->toaddr); in netbuf_new() [all …]
|
/external/icu/icu4c/source/tools/toolutil/ |
D | ucbuf.cpp | 163 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/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() 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/ |
D | SmallPtrSetTest.cpp | 20 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/google-breakpad/src/third_party/libdisasm/ |
D | x86_format.c | 18 #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/ |
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/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/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/toybox/toys/pending/ |
D | ipcs.c | 45 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/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/kmod/shared/ |
D | strbuf.c | 31 static bool buf_grow(struct strbuf *buf, size_t newsize) in buf_grow() argument 36 if (newsize <= buf->size) in buf_grow() 44 tmp = realloc(buf->bytes, sz); in buf_grow() 47 buf->bytes = tmp; in buf_grow() 48 buf->size = sz; in buf_grow() 52 void strbuf_init(struct strbuf *buf) in strbuf_init() argument 54 buf->bytes = NULL; in strbuf_init() 55 buf->size = 0; in strbuf_init() 56 buf->used = 0; in strbuf_init() 59 void strbuf_release(struct strbuf *buf) in strbuf_release() argument [all …]
|
/external/dtc/tests/ |
D | mangle-layout.c | 33 char *buf; member 37 static void expand_buf(struct bufstate *buf, int newsize) in expand_buf() argument 39 buf->buf = realloc(buf->buf, newsize); in expand_buf() 40 if (!buf->buf) in expand_buf() 42 buf->size = newsize; in expand_buf() 45 static void new_header(struct bufstate *buf, int version, const void *fdt) in new_header() argument 56 expand_buf(buf, hdrsize); in new_header() 57 memset(buf->buf, 0, hdrsize); in new_header() 59 fdt_set_magic(buf->buf, FDT_MAGIC); in new_header() 60 fdt_set_version(buf->buf, version); in new_header() [all …]
|