backend/drm: avoid gcc stringop-truncation warning

This commit is contained in:
Ronan Pigott 2020-12-18 14:08:44 -07:00 committed by Simon Ser
parent 352fdd1bb0
commit 917ecca58e
1 changed files with 2 additions and 2 deletions

View File

@ -1317,8 +1317,8 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
wlr_output_init(&wlr_conn->output, &drm->backend, &output_impl, wlr_output_init(&wlr_conn->output, &drm->backend, &output_impl,
drm->display); drm->display);
strncpy(wlr_conn->output.name, wlr_conn->name, memcpy(wlr_conn->output.name, wlr_conn->name,
sizeof(wlr_conn->output.name) - 1); sizeof(wlr_conn->output.name));
wlr_conn->output.phys_width = drm_conn->mmWidth; wlr_conn->output.phys_width = drm_conn->mmWidth;
wlr_conn->output.phys_height = drm_conn->mmHeight; wlr_conn->output.phys_height = drm_conn->mmHeight;