diff options
| author | Alejandro Colomar <colomar.6.4.3@gmail.com> | 2020-09-03 21:57:28 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-09-05 14:49:42 +0200 |
| commit | a899cafef489c6df272d9e2f0a3324845b3b7d76 (patch) | |
| tree | e493d399059015df4d5f8b1031b446201b33c126 | |
| parent | 23766e41b5559acddfdfa9f86379376d51f85256 (diff) | |
| download | man-pages-a899cafef489c6df272d9e2f0a3324845b3b7d76.tar.gz | |
aio.7: 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>
| -rw-r--r-- | man7/aio.7 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/man7/aio.7 b/man7/aio.7 index dd05dce834..d3ab3f4223 100644 --- a/man7/aio.7 +++ b/man7/aio.7 @@ -311,11 +311,11 @@ main(int argc, char *argv[]) /* Allocate our arrays */ - ioList = calloc(numReqs, sizeof(struct ioRequest)); + ioList = calloc(numReqs, sizeof(*ioList)); if (ioList == NULL) errExit("calloc"); - aiocbList = calloc(numReqs, sizeof(struct aiocb)); + aiocbList = calloc(numReqs, sizeof(*aiocbList)); if (aiocbList == NULL) errExit("calloc"); |
