Merge "Modify a data structure into a union."

This commit is contained in:
Christopher Ferris
2022-11-03 01:20:03 +00:00
committed by Gerrit Code Review

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;