aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-03 18:32:10 +0100
committerAlexander Orzechowski <alex@ozal.ski>2022-11-15 21:16:25 +0000
commit77d9fc08483fd516e1540fdbfaf9ee789772a778 (patch)
tree5ddf84fd47c33acccb643e023aed59ea55db9663
parente7c556fcf61eb3121d741cd4da526b2619862678 (diff)
backend: rename backend to multi in wlr_backend_autocreate()
This function deals with multiple kinds of backends. Make it more obvious that this variable holds the multi backend which is returned to the user.
-rw-r--r--backend/backend.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/backend/backend.c b/backend/backend.c
index 2b72d923..e733d7ab 100644
--- a/backend/backend.c
+++ b/backend/backend.c
@@ -285,8 +285,8 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
}
struct wlr_session *session = NULL;
- struct wlr_backend *backend = wlr_multi_backend_create(display);
- if (!backend) {
+ struct wlr_backend *multi = wlr_multi_backend_create(display);
+ if (!multi) {
wlr_log(WLR_ERROR, "could not allocate multibackend");
return NULL;
}
@@ -305,7 +305,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
char *saveptr;
char *name = strtok_r(names, ",", &saveptr);
while (name != NULL) {
- if (!attempt_backend_by_name(display, backend, name, &session)) {
+ if (!attempt_backend_by_name(display, multi, name, &session)) {
wlr_log(WLR_ERROR, "failed to add backend '%s'", name);
free(names);
goto error;
@@ -324,7 +324,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
goto error;
}
- wlr_multi_backend_add(backend, wl_backend);
+ wlr_multi_backend_add(multi, wl_backend);
goto success;
}
@@ -337,7 +337,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
goto error;
}
- wlr_multi_backend_add(backend, x11_backend);
+ wlr_multi_backend_add(multi, x11_backend);
goto success;
}
#endif
@@ -356,7 +356,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
wlr_log(WLR_ERROR, "Failed to start libinput backend");
goto error;
}
- wlr_multi_backend_add(backend, libinput);
+ wlr_multi_backend_add(multi, libinput);
#else
if (env_parse_bool("WLR_LIBINPUT_NO_DEVICES")) {
wlr_log(WLR_INFO, "WLR_LIBINPUT_NO_DEVICES is set, "
@@ -371,23 +371,23 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display,
#if WLR_HAS_DRM_BACKEND
struct wlr_backend *primary_drm =
- attempt_drm_backend(display, backend, session);
+ attempt_drm_backend(display, multi, session);
if (!primary_drm) {
wlr_log(WLR_ERROR, "Failed to open any DRM device");
goto error;
}
- drm_backend_monitor_create(backend, primary_drm, session);
+ drm_backend_monitor_create(multi, primary_drm, session);
#endif
success:
if (session_ptr != NULL) {
*session_ptr = session;
}
- return backend;
+ return multi;
error:
- wlr_backend_destroy(backend);
+ wlr_backend_destroy(multi);
wlr_session_destroy(session);
return NULL;
}