mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
session-lock: eliminate pointless compound literal
In C++, this would have caused a use-after-free. In C, the unnamed array remains in scope longer, so it's okay, but still pointless.
This commit is contained in:
parent
4afbfac528
commit
7d2b5150e8
1 changed files with 1 additions and 1 deletions
|
|
@ -216,7 +216,7 @@ session_lock_output_create(struct session_lock_manager *manager, struct output *
|
|||
* all outputs with an opaque color such that their normal content is
|
||||
* fully hidden
|
||||
*/
|
||||
float *black = (float[4]) { 0.f, 0.f, 0.f, 1.f };
|
||||
float black[4] = { 0.f, 0.f, 0.f, 1.f };
|
||||
struct wlr_scene_rect *background = wlr_scene_rect_create(tree, 0, 0, black);
|
||||
if (!background) {
|
||||
wlr_log(WLR_ERROR, "session-lock: wlr_scene_rect_create()");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue