]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
mbsinit.3: Use sizeof consistently
authorAlejandro Colomar <colomar.6.4.3@gmail.com>
Thu, 3 Sep 2020 19:50:10 +0000 (21:50 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 5 Sep 2020 12:49:42 +0000 (14:49 +0200)
Use ``sizeof`` consistently through all the examples in the following
way:

- Use the name of the variable instead of its type as argument for
  ``sizeof``.

Rationale:
https://www.kernel.org/doc/html/v5.8/process/coding-style.html#allocating-memory

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/mbsinit.3

index aeaa6ce889ee9d6dc0fcc1c1b3afab4590f17d6b..74fe48f86335c47e7394f9763d87f672b5e162cf 100644 (file)
@@ -59,7 +59,7 @@ in initial state is to set it to zero:
 .in +4n
 .EX
 mbstate_t state;
-memset(&state, 0, sizeof(mbstate_t));
+memset(&state, 0, sizeof(state));
 .EE
 .in
 .PP