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

With assertions disabled, it should make sense to return NULL.
master
Antonin Décimo 5 years ago committed by Drew DeVault
parent 0695324de7
commit 68b4a5305e

@ -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…
Cancel
Save