From 24f8644c28e602206a63fae53c4eb3d32426ce0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Fri, 3 Nov 2023 19:37:44 +0000 Subject: [PATCH] color: fix attr_color_copy() --- color/attr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/color/attr.c b/color/attr.c index 7846209cb1e..c389c37311a 100644 --- a/color/attr.c +++ b/color/attr.c @@ -166,11 +166,10 @@ struct AttrColor *attr_color_list_find(struct AttrColorList *acl, color_t fg, */ struct AttrColor attr_color_copy(const struct AttrColor *ac) { - struct AttrColor copy = { 0 }; if (ac) - copy = *ac; - - return copy; + return *ac; + else + return (struct AttrColor){ 0 }; } /**