]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd,test_mkfds: (cosmetic) remove whitespaces between functions and their arglists
authorMasatake YAMATO <yamato@redhat.com>
Fri, 19 Jan 2024 15:03:46 +0000 (00:03 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Fri, 19 Jan 2024 15:09:04 +0000 (00:09 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/lsfd-cdev.c
misc-utils/lsfd-file.c
misc-utils/lsfd-unkn.c
misc-utils/lsfd.c
tests/helpers/test_mkfds.c

index 63f95ed516b59d13dcd64c76e1ba6d4ca2df4ac6..cbb2d051bbb6e4dbe9d9ca6a30802d53418e847e 100644 (file)
@@ -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)
index f65910d31caf8f51b81befdae052ce8493b5d7d8..9b91462d6b157e8bab46c30d28f4496d091274f8 100644 (file)
@@ -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)
index fdf24ed0176e214557d5534d2733ad7132cdc012..8f6e90846890d38b2e4358cca3e1b833057fcce9 100644 (file)
@@ -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)
index cc6a00e374d7ca42d443870b6c1152d1c6d07bfc..8589d9397c6d377dcf89bbe3759c0aad407be519 100644 (file)
@@ -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,
index deaa759e920343cc5689f4664c79854418b4e5af..3eb627734ae40705f445bee9521b34f9d0e5e47a 100644 (file)
@@ -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);
 }