Merge "Update language to comply with Android's inclusive language guidance"
This commit is contained in:
commit
98ea1340fb
4 changed files with 12 additions and 13 deletions
|
|
@ -122,7 +122,8 @@ static bool check_vendor_memfd_allowed() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If its not a number, assume string, but check if its a sane string */
|
// Non-numeric should be a single ASCII character. Characters after the
|
||||||
|
// first are ignored.
|
||||||
if (tolower(vndk_version[0]) < 'a' || tolower(vndk_version[0]) > 'z') {
|
if (tolower(vndk_version[0]) < 'a' || tolower(vndk_version[0]) > 'z') {
|
||||||
ALOGE("memfd: ro.vndk.version not defined or invalid (%s), this is mandated since P.\n",
|
ALOGE("memfd: ro.vndk.version not defined or invalid (%s), this is mandated since P.\n",
|
||||||
vndk_version.c_str());
|
vndk_version.c_str());
|
||||||
|
|
|
||||||
|
|
@ -38,24 +38,24 @@ class netdHandler {
|
||||||
int (*netdDeleteTagData)(uint32_t, uid_t);
|
int (*netdDeleteTagData)(uint32_t, uid_t);
|
||||||
};
|
};
|
||||||
|
|
||||||
int dummyTagSocket(int, uint32_t, uid_t) {
|
int stubTagSocket(int, uint32_t, uid_t) {
|
||||||
return -EREMOTEIO;
|
return -EREMOTEIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dummyUntagSocket(int) {
|
int stubUntagSocket(int) {
|
||||||
return -EREMOTEIO;
|
return -EREMOTEIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dummySetCounterSet(uint32_t, uid_t) {
|
int stubSetCounterSet(uint32_t, uid_t) {
|
||||||
return -EREMOTEIO;
|
return -EREMOTEIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dummyDeleteTagData(uint32_t, uid_t) {
|
int stubDeleteTagData(uint32_t, uid_t) {
|
||||||
return -EREMOTEIO;
|
return -EREMOTEIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
netdHandler initHandler(void) {
|
netdHandler initHandler(void) {
|
||||||
netdHandler handler = {dummyTagSocket, dummyUntagSocket, dummySetCounterSet, dummyDeleteTagData};
|
netdHandler handler = {stubTagSocket, stubUntagSocket, stubSetCounterSet, stubDeleteTagData};
|
||||||
|
|
||||||
void* netdClientHandle = dlopen("libnetd_client.so", RTLD_NOW);
|
void* netdClientHandle = dlopen("libnetd_client.so", RTLD_NOW);
|
||||||
if (!netdClientHandle) {
|
if (!netdClientHandle) {
|
||||||
|
|
|
||||||
|
|
@ -162,9 +162,9 @@ int32_t utf32_from_utf8_at(const char *src, size_t src_len, size_t index, size_t
|
||||||
if (index >= src_len) {
|
if (index >= src_len) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
size_t dummy_index;
|
size_t unused_index;
|
||||||
if (next_index == nullptr) {
|
if (next_index == nullptr) {
|
||||||
next_index = &dummy_index;
|
next_index = &unused_index;
|
||||||
}
|
}
|
||||||
size_t num_read;
|
size_t num_read;
|
||||||
int32_t ret = utf32_at_internal(src + index, &num_read);
|
int32_t ret = utf32_at_internal(src + index, &num_read);
|
||||||
|
|
|
||||||
|
|
@ -23,15 +23,13 @@
|
||||||
#include <log/log.h>
|
#include <log/log.h>
|
||||||
#include <utils/TypeHelpers.h>
|
#include <utils/TypeHelpers.h>
|
||||||
#include <utils/VectorImpl.h>
|
#include <utils/VectorImpl.h>
|
||||||
|
|
||||||
/*
|
|
||||||
* Used to blacklist some functions from CFI.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifndef __has_attribute
|
#ifndef __has_attribute
|
||||||
#define __has_attribute(x) 0
|
#define __has_attribute(x) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Used to exclude some functions from CFI.
|
||||||
|
*/
|
||||||
#if __has_attribute(no_sanitize)
|
#if __has_attribute(no_sanitize)
|
||||||
#define UTILS_VECTOR_NO_CFI __attribute__((no_sanitize("cfi")))
|
#define UTILS_VECTOR_NO_CFI __attribute__((no_sanitize("cfi")))
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue