summaryrefslogtreecommitdiff
path: root/src/config/ConfigWatcher.cpp
diff options
context:
space:
mode:
authorKamikadze <40305144+Kam1k4dze@users.noreply.github.com>2025-08-14 19:44:56 +0500
committerGitHub <noreply@github.com>2025-08-14 15:44:56 +0100
commitbeee22a95ed9044950e5486f22edd813e00ffa2c (patch)
tree4612fa3d9b17275d417a059c19f998c64e871997 /src/config/ConfigWatcher.cpp
parentaa6a78f0a4e17c49ed4aff8b58c3f7ec7ef0408f (diff)
refactor: Use new hyprutils casts (#11377)
Diffstat (limited to 'src/config/ConfigWatcher.cpp')
-rw-r--r--src/config/ConfigWatcher.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config/ConfigWatcher.cpp b/src/config/ConfigWatcher.cpp
index 2ec1c05d..f3a8a2ca 100644
--- a/src/config/ConfigWatcher.cpp
+++ b/src/config/ConfigWatcher.cpp
@@ -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;
}