aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Pigott <rpigott@berkeley.edu>2020-12-18 14:08:44 -0700
committerSimon Ser <contact@emersion.fr>2020-12-18 22:19:16 +0100
commit917ecca58ea8ec88a413982502108903066641f0 (patch)
tree94d25ed572f5a49895084f64191f321a740541a7
parent352fdd1bb00a3547591f9360b23c5c2fd22e97e4 (diff)
backend/drm: avoid gcc stringop-truncation warning
-rw-r--r--backend/drm/drm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index bdd0b1e4..50256abd 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1317,8 +1317,8 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
wlr_output_init(&wlr_conn->output, &drm->backend, &output_impl,
drm->display);
- strncpy(wlr_conn->output.name, wlr_conn->name,
- sizeof(wlr_conn->output.name) - 1);
+ memcpy(wlr_conn->output.name, wlr_conn->name,
+ sizeof(wlr_conn->output.name));
wlr_conn->output.phys_width = drm_conn->mmWidth;
wlr_conn->output.phys_height = drm_conn->mmHeight;