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)
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)
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;
}
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)
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)
}
out:
- free (local.iov_base);
+ free(local.iov_base);
}
static void mark_select_fds_as_multiplexed(char *buf,
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;
}
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);
}
errno = e;
err(EXIT_FAILURE, "failed in dup2");
}
- data = xmalloc(sizeof (iDupfd));
+ data = xmalloc(sizeof(iDupfd));
*((int *)data) = iDupfd;
}
if (data) {
int *fdp = data;
close(*fdp);
- free (data);
+ free(data);
}
}
"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) {
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);
}
}
fdescs[i].close(fdescs[i].fd, fdescs[i].data);
if (factory->free)
- factory->free (factory, data);
+ factory->free(factory, data);
exit(EXIT_SUCCESS);
}