mirror of https://github.com/mkerrisk/man-pages
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>
This commit is contained in:
parent
bbedcb755a
commit
b300d5cf92
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue