mirror of https://github.com/mkerrisk/man-pages
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:
parent
b32a693559
commit
b5cd247069
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue