From: Masatake YAMATO Date: Fri, 19 Jan 2024 15:03:46 +0000 (+0900) Subject: lsfd,test_mkfds: (cosmetic) remove whitespaces between functions and their arglists X-Git-Tag: v2.40-rc1~36^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ce88537d786fd6c53bced6fa6d402ff64e6ec28;p=thirdparty%2Futil-linux.git lsfd,test_mkfds: (cosmetic) remove whitespaces between functions and their arglists Signed-off-by: Masatake YAMATO --- diff --git a/misc-utils/lsfd-cdev.c b/misc-utils/lsfd-cdev.c index 63f95ed516..cbb2d051bb 100644 --- a/misc-utils/lsfd-cdev.c +++ b/misc-utils/lsfd-cdev.c @@ -205,7 +205,7 @@ static struct ttydrv *read_ttydrv(const char *line) if (sscanf(p, "%" stringify_value(TTY_DRIVERS_LINE_LEN0) "[^ ]", name) != 1) return NULL; - p += strlen (name); + p += strlen(name); if (sscanf(p, " %lu %lu-%lu ", &major, minor_range, minor_range + 1) != 3) { if (sscanf(p, " %lu %lu ", &major, minor_range) == 2) diff --git a/misc-utils/lsfd-file.c b/misc-utils/lsfd-file.c index f65910d31c..9b91462d6b 100644 --- a/misc-utils/lsfd-file.c +++ b/misc-utils/lsfd-file.c @@ -574,25 +574,25 @@ static void init_nsfs_file_content(struct file *file) int ns_fd; int ns_type; - if (is_association (file, NS_CGROUP)) + if (is_association(file, NS_CGROUP)) nsfs_file->clone_type = CLONE_NEWCGROUP; - else if (is_association (file, NS_IPC)) + else if (is_association(file, NS_IPC)) nsfs_file->clone_type = CLONE_NEWIPC; - else if (is_association (file, NS_MNT)) + else if (is_association(file, NS_MNT)) nsfs_file->clone_type = CLONE_NEWNS; - else if (is_association (file, NS_NET)) + else if (is_association(file, NS_NET)) nsfs_file->clone_type = CLONE_NEWNET; - else if (is_association (file, NS_PID) - || is_association (file, NS_PID4C)) + else if (is_association(file, NS_PID) + || is_association(file, NS_PID4C)) nsfs_file->clone_type = CLONE_NEWPID; #ifdef CLONE_NEWTIME - else if (is_association (file, NS_TIME) - || is_association (file, NS_TIME4C)) + else if (is_association(file, NS_TIME) + || is_association(file, NS_TIME4C)) nsfs_file->clone_type = CLONE_NEWTIME; #endif - else if (is_association (file, NS_USER)) + else if (is_association(file, NS_USER)) nsfs_file->clone_type = CLONE_NEWUSER; - else if (is_association (file, NS_UTS)) + else if (is_association(file, NS_UTS)) nsfs_file->clone_type = CLONE_NEWUTS; if (nsfs_file->clone_type != -1) diff --git a/misc-utils/lsfd-unkn.c b/misc-utils/lsfd-unkn.c index fdf24ed017..8f6e908468 100644 --- a/misc-utils/lsfd-unkn.c +++ b/misc-utils/lsfd-unkn.c @@ -576,7 +576,7 @@ bool is_multiplexed_by_eventpoll(int fd, struct list_head *eventpolls) struct anon_eventpoll_data *data = list_entry(t, struct anon_eventpoll_data, siblings); if (data->count) { if (bsearch(&fd, data->tfds, - data->count, sizeof (data->tfds[0]), + data->count, sizeof(data->tfds[0]), numcomp)) return true; } @@ -1131,7 +1131,7 @@ static void anon_bpf_prog_get_more_info(struct anon_bpf_prog_data *prog_data) BPF_OBJ_NAME_LEN); prog_data->name[BPF_OBJ_NAME_LEN] = '\0'; } - close (bpf_fd); + close(bpf_fd); } static int anon_bpf_prog_handle_fdinfo(struct unkn *unkn, const char *key, const char *value) @@ -1314,7 +1314,7 @@ static void anon_bpf_map_get_more_info(struct anon_bpf_map_data *map_data) BPF_OBJ_NAME_LEN); map_data->name[BPF_OBJ_NAME_LEN] = '\0'; } - close (bpf_fd); + close(bpf_fd); } static int anon_bpf_map_handle_fdinfo(struct unkn *unkn, const char *key, const char *value) diff --git a/misc-utils/lsfd.c b/misc-utils/lsfd.c index cc6a00e374..8589d9397c 100644 --- a/misc-utils/lsfd.c +++ b/misc-utils/lsfd.c @@ -1530,7 +1530,7 @@ static void mark_poll_fds_as_multiplexed(char *buf, } out: - free (local.iov_base); + free(local.iov_base); } static void mark_select_fds_as_multiplexed(char *buf, diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c index deaa759e92..3eb627734a 100644 --- a/tests/helpers/test_mkfds.c +++ b/tests/helpers/test_mkfds.c @@ -306,7 +306,7 @@ static struct arg decode_arg(const char *pname, v = NULL; } } - arg.v = ptype_classes [p->type].read (v, &p->defv); + arg.v = ptype_classes [p->type].read(v, &p->defv); arg.free = ptype_classes [p->type].free; return arg; } @@ -681,7 +681,7 @@ static void *make_w_regular_file(const struct factory *factory, struct fdesc fde int e = errno; close(fd); unlink(fname); - free (fname); + free(fname); errno = e; err(EXIT_FAILURE, "failed to dup %d -> %d", fd, fdescs[0].fd); } @@ -720,7 +720,7 @@ static void *make_w_regular_file(const struct factory *factory, struct fdesc fde errno = e; err(EXIT_FAILURE, "failed in dup2"); } - data = xmalloc(sizeof (iDupfd)); + data = xmalloc(sizeof(iDupfd)); *((int *)data) = iDupfd; } @@ -740,7 +740,7 @@ static void free_after_closing_duplicated_fd(const struct factory * factory _U_, if (data) { int *fdp = data; close(*fdp); - free (data); + free(data); } } @@ -1131,7 +1131,7 @@ static void *make_mmapped_packet_socket(const struct factory *factory, struct fd "failed to specify a buffer spec to a packet socket"); } - munmap_data = xmalloc(sizeof (*munmap_data)); + munmap_data = xmalloc(sizeof(*munmap_data)); munmap_data->len = (size_t) req.tp_block_size * req.tp_block_nr; munmap_data->ptr = mmap(NULL, munmap_data->len, PROT_WRITE, MAP_SHARED, sd, 0); if (munmap_data->ptr == MAP_FAILED) { @@ -2708,9 +2708,9 @@ static void *make_eventpoll(const struct factory *factory _U_, struct fdesc fdes for (size_t j = i; j > 0; j--) close(fdescs[j].fd); errno = e; - err (EXIT_FAILURE, - "failed to add fd %d to the eventpoll fd with epoll_ctl", - fdescs[i].fd); + err(EXIT_FAILURE, + "failed to add fd %d to the eventpoll fd with epoll_ctl", + fdescs[i].fd); } } @@ -4339,7 +4339,7 @@ int main(int argc, char **argv) fdescs[i].close(fdescs[i].fd, fdescs[i].data); if (factory->free) - factory->free (factory, data); + factory->free(factory, data); exit(EXIT_SUCCESS); }