diff options
author | Ronan Pigott <rpigott@berkeley.edu> | 2020-12-18 14:08:44 -0700 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-12-18 22:19:16 +0100 |
commit | 917ecca58ea8ec88a413982502108903066641f0 (patch) | |
tree | 94d25ed572f5a49895084f64191f321a740541a7 | |
parent | 352fdd1bb00a3547591f9360b23c5c2fd22e97e4 (diff) |
backend/drm: avoid gcc stringop-truncation warning
-rw-r--r-- | backend/drm/drm.c | 4 |
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; |