summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-27 11:21:38 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-27 11:21:38 -0400
commit0015289fec2c54de481cab87fb5b43bc2d1f2a4a (patch)
tree6b26187ebe05d47224bfa21e77c3dbb5cfdbbbf9 /src/eval.c
parentcaeff0108d59d36a3c3fc62fd5ed788eaaf4f0a5 (diff)
downloadbfs-0015289fec2c54de481cab87fb5b43bc2d1f2a4a.tar.xz
Use {0} to initialize mbstate_t rather than memset()
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index 05be5bb..56d7cd8 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1147,8 +1147,7 @@ static void eval_status(struct bfs_eval *state, struct bfs_bar *bar, struct time
size_t pathmax = width - rhslen - 3;
size_t pathwidth = 0;
size_t lhslen = 0;
- mbstate_t mb;
- memset(&mb, 0, sizeof(mb));
+ mbstate_t mb = {0};
for (size_t i = lhslen; lhslen < pathlen; lhslen = i) {
wint_t wc = xmbrtowc(status, &i, pathlen, &mb);
int cwidth;