refactor: Use new hyprutils casts (#11377)
This commit is contained in:
parent
aa6a78f0a4
commit
beee22a95e
116 changed files with 715 additions and 696 deletions
|
|
@ -72,15 +72,15 @@ void CConfigWatcher::onInotifyEvent() {
|
|||
if (bytesRead <= 0)
|
||||
return;
|
||||
|
||||
for (size_t offset = 0; offset < (size_t)bytesRead;) {
|
||||
const auto* ev = (const inotify_event*)(buffer.data() + offset);
|
||||
for (size_t offset = 0; offset < sc<size_t>(bytesRead);) {
|
||||
const auto* ev = rc<const inotify_event*>(buffer.data() + offset);
|
||||
|
||||
if (offset + sizeof(inotify_event) > (size_t)bytesRead) {
|
||||
if (offset + sizeof(inotify_event) > sc<size_t>(bytesRead)) {
|
||||
Debug::log(ERR, "CConfigWatcher: malformed inotify event, truncated header");
|
||||
break;
|
||||
}
|
||||
|
||||
if (offset + sizeof(inotify_event) + ev->len > (size_t)(bytesRead)) {
|
||||
if (offset + sizeof(inotify_event) + ev->len > sc<size_t>(bytesRead)) {
|
||||
Debug::log(ERR, "CConfigWatcher: malformed inotify event, truncated name field");
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue