aboutsummaryrefslogtreecommitdiffstats
path: root/man2
diff options
context:
space:
mode:
authorAlejandro Colomar <colomar.6.4.3@gmail.com>2020-09-03 21:41:31 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-09-05 14:49:42 +0200
commitb300d5cf92c27e63f91e82adc200c36c58f457d9 (patch)
tree510ea9e2a87b24854be949fe34caba8f0d7e2347 /man2
parentbbedcb755a9366121142e5b182e2834c4cb35bf2 (diff)
downloadman-pages-b300d5cf92c27e63f91e82adc200c36c58f457d9.tar.gz
signalfd.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>
Diffstat (limited to 'man2')
-rw-r--r--man2/signalfd.24
1 files changed, 2 insertions, 2 deletions
diff --git a/man2/signalfd.2 b/man2/signalfd.2
index 96d502a505..92e9fd7efe 100644
--- a/man2/signalfd.2
+++ b/man2/signalfd.2
@@ -502,8 +502,8 @@ main(int argc, char *argv[])
handle_error("signalfd");
for (;;) {
- s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));
- if (s != sizeof(struct signalfd_siginfo))
+ s = read(sfd, &fdsi, sizeof(fdsi));
+ if (s != sizeof(fdsi))
handle_error("read");
if (fdsi.ssi_signo == SIGINT) {