Merge "Modify a data structure into a union." am: 8e965d90de

Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/2243423

Change-Id: I2672f7b1321efcd40651704db4398ffe22e370b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Christopher Ferris 2022-11-03 01:58:47 +00:00 committed by Automerger Merge Worker
commit 9d6b418d6f

View file

@ -194,9 +194,9 @@ void FileConnectionDetector::handleInotifyData(ssize_t len, const char *data) {
} }
bool FileConnectionDetector::readInotifyData() { bool FileConnectionDetector::readInotifyData() {
struct { union {
struct inotify_event ev; struct inotify_event ev;
char padding[NAME_MAX + 1]; char raw[sizeof(inotify_event) + NAME_MAX + 1];
} buffer; } buffer;
bool ret = true; bool ret = true;