diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-10-27 11:21:38 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-10-27 11:21:38 -0400 |
commit | 0015289fec2c54de481cab87fb5b43bc2d1f2a4a (patch) | |
tree | 6b26187ebe05d47224bfa21e77c3dbb5cfdbbbf9 /src/eval.c | |
parent | caeff0108d59d36a3c3fc62fd5ed788eaaf4f0a5 (diff) | |
download | bfs-0015289fec2c54de481cab87fb5b43bc2d1f2a4a.tar.xz |
Use {0} to initialize mbstate_t rather than memset()
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |