getgrouplist.3, inotify.7: Use sizeof consistently

Use ``sizeof`` consistently through all the examples in the
following way:

- Never use a space after ``sizeof``, and always use parentheses
  around the argument.

  Rationale:
  https://www.kernel.org/doc/html/v5.8/process/coding-style.html#spaces

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:
Alejandro Colomar 2020-08-25 14:21:57 +02:00 committed by Michael Kerrisk
parent b32a693559
commit b5cd247069
2 changed files with 2 additions and 2 deletions

View File

@ -164,7 +164,7 @@ main(int argc, char *argv[])
ngroups = atoi(argv[2]);
groups = malloc(ngroups * sizeof (gid_t));
groups = malloc(ngroups * sizeof(gid_t));
if (groups == NULL) {
perror("malloc");
exit(EXIT_FAILURE);

View File

@ -952,7 +952,7 @@ handle_events(int fd, int *wd, int argc, char* argv[])
/* Read some events. */
len = read(fd, buf, sizeof buf);
len = read(fd, buf, sizeof(buf));
if (len == \-1 && errno != EAGAIN) {
perror("read");
exit(EXIT_FAILURE);