backend/session: non-void function should return a value

With assertions disabled, it should make sense to return NULL.
This commit is contained in:
Antonin Décimo 2019-08-09 15:36:35 +02:00 committed by Drew DeVault
parent 0695324de7
commit 68b4a5305e
2 changed files with 2 additions and 0 deletions

View file

@ -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",
(unsigned long)devnum);
assert(0);
return NULL;
}
static int pause_device(sd_bus_message *msg, void *userdata,

View file

@ -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);
assert(0);
return NULL;
}
void wlr_session_close_file(struct wlr_session *session, int fd) {