diff options
author | Antonin Décimo <antonin.decimo@gmail.com> | 2019-08-09 15:36:35 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-12 09:37:21 +0900 |
commit | 68b4a5305e8dfca2056d0b49d947e8df831c6961 (patch) | |
tree | 6bd8a1120144721ba44d88144fcf98939856462c /backend/session | |
parent | 0695324de7efc2bd3070de162e230327b2d15441 (diff) |
backend/session: non-void function should return a value
With assertions disabled, it should make sense to return NULL.
Diffstat (limited to 'backend/session')
-rw-r--r-- | backend/session/logind.c | 1 | ||||
-rw-r--r-- | backend/session/session.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/backend/session/logind.c b/backend/session/logind.c index 066003d9..393924e8 100644 --- a/backend/session/logind.c +++ b/backend/session/logind.c @@ -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, diff --git a/backend/session/session.c b/backend/session/session.c index 70b4a567..a98093c7 100644 --- a/backend/session/session.c +++ b/backend/session/session.c @@ -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) { |