This is the patch for (1) as numbered in the previous replies: ----------------------------------------------------------------------- >From b0880bd0485d9abc93bcb3055342ec328240b7cf Mon Sep 17 00:00:00 2001 From: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx> Date: Tue, 25 Aug 2020 14:14:21 +0200 Subject: [PATCH] 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@xxxxxxxxx> --- man3/getgrouplist.3 | 2 +- man7/inotify.7 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/getgrouplist.3 b/man3/getgrouplist.3 index 61c88f75f..aea52d999 100644 --- a/man3/getgrouplist.3 +++ b/man3/getgrouplist.3 @@ -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); diff --git a/man7/inotify.7 b/man7/inotify.7 index e60d9c82b..9b2d7a4e5 100644 --- a/man7/inotify.7 +++ b/man7/inotify.7 @@ -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); -- 2.28.0