Skip to content

Commit

Permalink
adapter/windows: evidently cannot be null
Browse files Browse the repository at this point in the history
  • Loading branch information
Will committed Oct 6, 2023
1 parent 8d34a84 commit 41da2c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions devel/include/detail/wtr/watcher/adapter/windows/watch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class watch_event_proxy {

inline auto is_valid(watch_event_proxy& w) noexcept -> bool
{
return w.is_valid && w.event_buf != nullptr;
return w.is_valid;
}

inline auto has_event(watch_event_proxy& w) noexcept -> bool
Expand Down Expand Up @@ -111,7 +111,7 @@ inline auto do_event_recv(
&w.event_overlap,
nullptr);

if (w.event_buf && read_ok) {
if (read_ok) {
w.event_buf_len_ready = bytes_returned > 0 ? bytes_returned : 0;
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions include/wtr/watcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,7 @@ class watch_event_proxy {

inline auto is_valid(watch_event_proxy& w) noexcept -> bool
{
return w.is_valid && w.event_buf != nullptr;
return w.is_valid;
}

inline auto has_event(watch_event_proxy& w) noexcept -> bool
Expand Down Expand Up @@ -1757,7 +1757,7 @@ inline auto do_event_recv(
&w.event_overlap,
nullptr);

if (w.event_buf && read_ok) {
if (read_ok) {
w.event_buf_len_ready = bytes_returned > 0 ? bytes_returned : 0;
return true;
}
Expand Down

0 comments on commit 41da2c6

Please sign in to comment.