From 5e046e6a84badbf21e99799db42712026cae2029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 24 Jun 2024 11:02:47 +0200 Subject: [PATCH] csi: sgr_reset(): avoid using memset() This _should_ be what the compiler does anyway (i.e. it _should_ replace the memset() with inline MOVs). But let's be sure. --- csi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/csi.c b/csi.c index 387c37d9..10f525ef 100644 --- a/csi.c +++ b/csi.c @@ -32,9 +32,8 @@ static void sgr_reset(struct terminal *term) { - /* TODO: can we drop this check? */ - memset(&term->vt.attrs, 0, sizeof(term->vt.attrs)); - memset(&term->vt.curly, 0, sizeof(term->vt.curly)); + term->vt.attrs = (struct attributes){0}; + term->vt.curly = (struct curly_range_data){0}; term->bits_affecting_ascii_printer.curly_style = false; term->bits_affecting_ascii_printer.curly_color = false;