Use space after a silencing (void)
We were using a space more often than not, and this way is codified in CODING_STYLE.
This commit is contained in:
@@ -98,7 +98,7 @@ Terminal *terminal_free(Terminal *t) {
|
||||
assert(t->workspace);
|
||||
|
||||
if (t->pty) {
|
||||
(void)pty_signal(t->pty, SIGHUP);
|
||||
(void) pty_signal(t->pty, SIGHUP);
|
||||
pty_close(t->pty);
|
||||
pty_unref(t->pty);
|
||||
}
|
||||
|
||||
@@ -150,14 +150,14 @@ static int mount_dev(BindMount *m) {
|
||||
return -errno;
|
||||
|
||||
dev = strjoina(temporary_mount, "/dev");
|
||||
(void)mkdir(dev, 0755);
|
||||
(void) mkdir(dev, 0755);
|
||||
if (mount("tmpfs", dev, "tmpfs", MS_NOSUID|MS_STRICTATIME, "mode=755") < 0) {
|
||||
r = -errno;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
devpts = strjoina(temporary_mount, "/dev/pts");
|
||||
(void)mkdir(devpts, 0755);
|
||||
(void) mkdir(devpts, 0755);
|
||||
if (mount("/dev/pts", devpts, NULL, MS_BIND, NULL) < 0) {
|
||||
r = -errno;
|
||||
goto fail;
|
||||
@@ -167,7 +167,7 @@ static int mount_dev(BindMount *m) {
|
||||
symlink("pts/ptmx", devptmx);
|
||||
|
||||
devshm = strjoina(temporary_mount, "/dev/shm");
|
||||
(void)mkdir(devshm, 01777);
|
||||
(void) mkdir(devshm, 01777);
|
||||
r = mount("/dev/shm", devshm, NULL, MS_BIND, NULL);
|
||||
if (r < 0) {
|
||||
r = -errno;
|
||||
@@ -175,11 +175,11 @@ static int mount_dev(BindMount *m) {
|
||||
}
|
||||
|
||||
devmqueue = strjoina(temporary_mount, "/dev/mqueue");
|
||||
(void)mkdir(devmqueue, 0755);
|
||||
(void) mkdir(devmqueue, 0755);
|
||||
mount("/dev/mqueue", devmqueue, NULL, MS_BIND, NULL);
|
||||
|
||||
devhugepages = strjoina(temporary_mount, "/dev/hugepages");
|
||||
(void)mkdir(devhugepages, 0755);
|
||||
(void) mkdir(devhugepages, 0755);
|
||||
mount("/dev/hugepages", devhugepages, NULL, MS_BIND, NULL);
|
||||
|
||||
devlog = strjoina(temporary_mount, "/dev/log");
|
||||
@@ -273,7 +273,7 @@ static int mount_kdbus(BindMount *m) {
|
||||
return log_error_errno(errno, "Failed create temp dir: %m");
|
||||
|
||||
root = strjoina(temporary_mount, "/kdbus");
|
||||
(void)mkdir(root, 0755);
|
||||
(void) mkdir(root, 0755);
|
||||
if (mount("tmpfs", root, "tmpfs", MS_NOSUID|MS_STRICTATIME, "mode=777") < 0) {
|
||||
r = -errno;
|
||||
goto fail;
|
||||
|
||||
@@ -61,7 +61,7 @@ int lldp_read_chassis_id(tlv_packet *tlv,
|
||||
*type = subtype;
|
||||
|
||||
out1:
|
||||
(void)lldp_tlv_packet_exit_container(tlv);
|
||||
(void) lldp_tlv_packet_exit_container(tlv);
|
||||
|
||||
out2:
|
||||
return r;
|
||||
@@ -113,7 +113,7 @@ int lldp_read_port_id(tlv_packet *tlv,
|
||||
*type = subtype;
|
||||
|
||||
out1:
|
||||
(void)lldp_tlv_packet_exit_container(tlv);
|
||||
(void) lldp_tlv_packet_exit_container(tlv);
|
||||
|
||||
out2:
|
||||
return r;
|
||||
@@ -130,7 +130,7 @@ int lldp_read_ttl(tlv_packet *tlv, uint16_t *ttl) {
|
||||
|
||||
r = tlv_packet_read_u16(tlv, ttl);
|
||||
|
||||
(void)lldp_tlv_packet_exit_container(tlv);
|
||||
(void) lldp_tlv_packet_exit_container(tlv);
|
||||
|
||||
out:
|
||||
return r;
|
||||
@@ -155,7 +155,7 @@ int lldp_read_system_name(tlv_packet *tlv,
|
||||
*data = (char *) s;
|
||||
|
||||
out:
|
||||
(void)lldp_tlv_packet_exit_container(tlv);
|
||||
(void) lldp_tlv_packet_exit_container(tlv);
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ int lldp_read_system_description(tlv_packet *tlv,
|
||||
*data = (char *) s;
|
||||
|
||||
out:
|
||||
(void)lldp_tlv_packet_exit_container(tlv);
|
||||
(void) lldp_tlv_packet_exit_container(tlv);
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -203,7 +203,7 @@ int lldp_read_port_description(tlv_packet *tlv,
|
||||
*data = (char *) s;
|
||||
|
||||
out:
|
||||
(void)lldp_tlv_packet_exit_container(tlv);
|
||||
(void) lldp_tlv_packet_exit_container(tlv);
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -224,7 +224,7 @@ int lldp_read_system_capability(tlv_packet *tlv, uint16_t *data) {
|
||||
return 0;
|
||||
out:
|
||||
|
||||
(void)lldp_tlv_packet_exit_container(tlv);
|
||||
(void) lldp_tlv_packet_exit_container(tlv);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
|
||||
free(s);
|
||||
s = k;
|
||||
|
||||
(void)lldp_read_system_capability(p->packet, &data);
|
||||
(void) lldp_read_system_capability(p->packet, &data);
|
||||
|
||||
sprintf(buf, "'_CAP=%x'", data);
|
||||
|
||||
|
||||
@@ -606,10 +606,10 @@ void bus_socket_setup(sd_bus *b) {
|
||||
/* Enable SO_PASSCRED + SO_PASSEC. We try this on any
|
||||
* socket, just in case. */
|
||||
enable = !b->bus_client;
|
||||
(void)setsockopt(b->input_fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable));
|
||||
(void) setsockopt(b->input_fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable));
|
||||
|
||||
enable = !b->bus_client && (b->attach_flags & KDBUS_ATTACH_SECLABEL);
|
||||
(void)setsockopt(b->input_fd, SOL_SOCKET, SO_PASSSEC, &enable, sizeof(enable));
|
||||
(void) setsockopt(b->input_fd, SOL_SOCKET, SO_PASSSEC, &enable, sizeof(enable));
|
||||
|
||||
/* Increase the buffers to 8 MB */
|
||||
fd_inc_rcvbuf(b->input_fd, SNDBUF_SIZE);
|
||||
|
||||
@@ -294,7 +294,7 @@ int network_get(Manager *manager, struct udev_device *device,
|
||||
|
||||
attr = udev_device_get_sysattr_value(device, "name_assign_type");
|
||||
if (attr)
|
||||
(void)safe_atou8(attr, &name_assign_type);
|
||||
(void) safe_atou8(attr, &name_assign_type);
|
||||
|
||||
if (name_assign_type == NET_NAME_ENUM)
|
||||
log_warning("%-*s: found matching network '%s', based on potentially unpredictable ifname",
|
||||
|
||||
@@ -387,7 +387,7 @@ int dns_scope_llmnr_membership(DnsScope *s, bool b) {
|
||||
* one. This is necessary on some devices, such as
|
||||
* veth. */
|
||||
if (b)
|
||||
(void)setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreqn, sizeof(mreqn));
|
||||
(void) setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreqn, sizeof(mreqn));
|
||||
|
||||
if (setsockopt(fd, IPPROTO_IP, b ? IP_ADD_MEMBERSHIP : IP_DROP_MEMBERSHIP, &mreqn, sizeof(mreqn)) < 0)
|
||||
return -errno;
|
||||
@@ -403,7 +403,7 @@ int dns_scope_llmnr_membership(DnsScope *s, bool b) {
|
||||
return fd;
|
||||
|
||||
if (b)
|
||||
(void)setsockopt(fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, &mreq, sizeof(mreq));
|
||||
(void) setsockopt(fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, &mreq, sizeof(mreq));
|
||||
|
||||
if (setsockopt(fd, IPPROTO_IPV6, b ? IPV6_ADD_MEMBERSHIP : IPV6_DROP_MEMBERSHIP, &mreq, sizeof(mreq)) < 0)
|
||||
return -errno;
|
||||
|
||||
@@ -86,6 +86,6 @@ static inline bool barrier_is_aborted(Barrier *b) {
|
||||
}
|
||||
|
||||
static inline bool barrier_place_and_sync(Barrier *b) {
|
||||
(void)barrier_place(b);
|
||||
(void) barrier_place(b);
|
||||
return barrier_sync(b);
|
||||
}
|
||||
|
||||
+1
-1
@@ -342,7 +342,7 @@ int pty_forward_new(
|
||||
f->master = master;
|
||||
|
||||
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) >= 0)
|
||||
(void)ioctl(master, TIOCSWINSZ, &ws);
|
||||
(void) ioctl(master, TIOCSWINSZ, &ws);
|
||||
|
||||
if (!read_only) {
|
||||
if (tcgetattr(STDIN_FILENO, &f->saved_stdin_attr) >= 0) {
|
||||
|
||||
@@ -739,7 +739,7 @@ int main(int argc, char *argv[]) {
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
|
||||
(void)sd_bus_negotiate_timestamp(bus, true);
|
||||
(void) sd_bus_negotiate_timestamp(bus, true);
|
||||
|
||||
r = context_read_data(&context);
|
||||
if (r < 0) {
|
||||
|
||||
@@ -255,7 +255,7 @@ int link_config_get(link_config_ctx *ctx, struct udev_device *device,
|
||||
|
||||
attr_value = udev_device_get_sysattr_value(device, "name_assign_type");
|
||||
if (attr_value)
|
||||
(void)safe_atou8(attr_value, &name_assign_type);
|
||||
(void) safe_atou8(attr_value, &name_assign_type);
|
||||
|
||||
if (name_assign_type == NET_NAME_ENUM) {
|
||||
log_warning("Config file %s applies to device based on potentially unpredictable interface name '%s'",
|
||||
|
||||
Reference in New Issue
Block a user