diff options
| author | Alejandro Colomar <colomar.6.4.3@gmail.com> | 2020-09-03 21:29:33 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-09-05 14:49:42 +0200 |
| commit | 284a36798f5b0460d543a4fc61d8a1a7eccdab1a (patch) | |
| tree | a7e85623c0305bb39d53cc217aa69b34af60bdd5 | |
| parent | 3376a638383c1290c6169de294176927b200d89a (diff) | |
| download | man-pages-284a36798f5b0460d543a4fc61d8a1a7eccdab1a.tar.gz | |
perf_event_open.2: 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-- | man2/perf_event_open.2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2 index ea5ee725fb..aea8257062 100644 --- a/man2/perf_event_open.2 +++ b/man2/perf_event_open.2 @@ -3439,7 +3439,7 @@ main(int argc, char **argv) printf("Measuring instruction count for this printf\en"); ioctl(fd, PERF_EVENT_IOC_DISABLE, 0); - read(fd, &count, sizeof(long long)); + read(fd, &count, sizeof(count)); printf("Used %lld instructions\en", count); |
