mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
backend/session: non-void function should return a value
With assertions disabled, it should make sense to return NULL.
This commit is contained in:
parent
0695324de7
commit
68b4a5305e
2 changed files with 2 additions and 0 deletions
|
@ -258,6 +258,7 @@ static struct wlr_device *find_device(struct wlr_session *session,
|
||||||
wlr_log(WLR_ERROR, "Tried to use dev_t %lu not opened by session",
|
wlr_log(WLR_ERROR, "Tried to use dev_t %lu not opened by session",
|
||||||
(unsigned long)devnum);
|
(unsigned long)devnum);
|
||||||
assert(0);
|
assert(0);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pause_device(sd_bus_message *msg, void *userdata,
|
static int pause_device(sd_bus_message *msg, void *userdata,
|
||||||
|
|
|
@ -197,6 +197,7 @@ static struct wlr_device *find_device(struct wlr_session *session, int fd) {
|
||||||
|
|
||||||
wlr_log(WLR_ERROR, "Tried to use fd %d not opened by session", fd);
|
wlr_log(WLR_ERROR, "Tried to use fd %d not opened by session", fd);
|
||||||
assert(0);
|
assert(0);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_session_close_file(struct wlr_session *session, int fd) {
|
void wlr_session_close_file(struct wlr_session *session, int fd) {
|
||||||
|
|
Loading…
Reference in a new issue