diff options
| author | Alejandro Colomar <colomar.6.4.3@gmail.com> | 2020-09-03 21:51:07 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-09-05 16:19:44 +0200 |
| commit | a7751aafaa57d133b5df6add6c567a925c20efd9 (patch) | |
| tree | c89d3e9dab332111763b57f5f5ea06427fa00ffc /man3 | |
| parent | 5780a2e7984ef2e42b8d3841c33afdfd67ba6a8d (diff) | |
| download | man-pages-a7751aafaa57d133b5df6add6c567a925c20efd9.tar.gz | |
mbstowcs.3: Use sizeof consistently
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>
Diffstat (limited to 'man3')
| -rw-r--r-- | man3/mbstowcs.3 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/man3/mbstowcs.3 b/man3/mbstowcs.3 index cf650506eb..2f9fbc17c3 100644 --- a/man3/mbstowcs.3 +++ b/man3/mbstowcs.3 @@ -186,7 +186,7 @@ main(int argc, char *argv[]) /* Allocate wide character string of the desired size. Add 1 to allow for terminating null wide character (L\(aq\e0\(aq). */ - wcs = calloc(mbslen + 1, sizeof(wchar_t)); + wcs = calloc(mbslen + 1, sizeof(*wcs)); if (wcs == NULL) { perror("calloc"); exit(EXIT_FAILURE); |
