Home
last modified time | relevance | path

Searched refs:dst_size (Results 1 – 3 of 3) sorted by relevance

/frameworks/native/cmds/installd/tests/
Dinstalld_utils_test.cpp427 size_t dst_size = 10; in TEST_F() local
428 char dst[dst_size]; in TEST_F()
432 EXPECT_EQ(0, append_and_increment(&dstp, src, &dst_size)) in TEST_F()
438 EXPECT_EQ(0, append_and_increment(&dstp, src, &dst_size)) in TEST_F()
446 size_t dst_size = 5; in TEST_F() local
447 char dst[dst_size]; in TEST_F()
451 EXPECT_EQ(0, append_and_increment(&dstp, src, &dst_size)) in TEST_F()
457 EXPECT_EQ(-1, append_and_increment(&dstp, src, &dst_size)) in TEST_F()
/frameworks/native/cmds/installd/
Dutils.cpp1139 size_t dst_size = path_len + 2; in get_path_from_string() local
1141 rec->path = (char*) malloc(dst_size); in get_path_from_string()
1148 if (append_and_increment(&dst, path, &dst_size) < 0 in get_path_from_string()
1149 || append_and_increment(&dst, "/", &dst_size)) { in get_path_from_string()
1211 int append_and_increment(char** dst, const char* src, size_t* dst_size) { in append_and_increment() argument
1212 ssize_t ret = strlcpy(*dst, src, *dst_size); in append_and_increment()
1213 if (ret < 0 || (size_t) ret >= *dst_size) { in append_and_increment()
1217 *dst_size -= ret; in append_and_increment()
Dutils.h146 int append_and_increment(char** dst, const char* src, size_t* dst_size);