diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-23 14:58:01 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-23 14:58:01 -0500 |
commit | 465306dde9b8640e2985b5a4ff9c9145d82f5460 (patch) | |
tree | a35aed15c6cec0701fe1095b56f641c53165c424 | |
parent | c550f7a9b89d017215af084288bc44f736f774fe (diff) | |
parent | 404d53a968147cbb44b3ecf756b0ab4db77d962a (diff) |
Merge pull request #2725 from phomes/misc-cleanup
Misc cleanup
-rw-r--r-- | src/basic/signal-util.h | 8 | ||||
-rw-r--r-- | src/libsystemd/sd-network/sd-network.c | 1 | ||||
-rw-r--r-- | src/network/networkctl.c | 2 | ||||
-rw-r--r-- | src/resolve/resolved-bus.c | 1 | ||||
-rw-r--r-- | src/resolve/test-dns-packet.c | 1 |
5 files changed, 5 insertions, 8 deletions
diff --git a/src/basic/signal-util.h b/src/basic/signal-util.h index 72b10e8712..a7322ff26a 100644 --- a/src/basic/signal-util.h +++ b/src/basic/signal-util.h @@ -44,9 +44,9 @@ static inline void block_signals_reset(sigset_t *ss) { assert_se(sigprocmask(SIG_SETMASK, ss, NULL) >= 0); } -#define BLOCK_SIGNALS(...) \ - _cleanup_(block_signals_reset) sigset_t _saved_sigset = ({ \ - sigset_t t; \ +#define BLOCK_SIGNALS(...) \ + _cleanup_(block_signals_reset) _unused_ sigset_t _saved_sigset = ({ \ + sigset_t t; \ assert_se(sigprocmask_many(SIG_BLOCK, &t, __VA_ARGS__, -1) >= 0); \ - t; \ + t; \ }) diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c index 580047d3ab..f8e18f23fd 100644 --- a/src/libsystemd/sd-network/sd-network.c +++ b/src/libsystemd/sd-network/sd-network.c @@ -209,7 +209,6 @@ _public_ int sd_network_link_get_route_domains(int ifindex, char ***ret) { static int network_link_get_ifindexes(int ifindex, const char *key, int **ret) { char path[strlen("/run/systemd/netif/links/") + DECIMAL_STR_MAX(ifindex) + 1]; - _cleanup_strv_free_ char **a = NULL; _cleanup_free_ int *ifis = NULL; _cleanup_free_ char *s = NULL; size_t allocated = 0, c = 0; diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 07ac15f478..6b1fbc603e 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -903,7 +903,7 @@ static char *lldp_capabilities_to_string(uint16_t x) { static void lldp_capabilities_legend(uint16_t x) { unsigned w, i, cols = columns(); - static const char const* table[] = { + static const char* const table[] = { "o - Other", "p - Repeater", "b - Bridge", diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c index 214810362d..16cae8c1e5 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -1137,7 +1137,6 @@ finish: static int bus_method_resolve_service(sd_bus_message *message, void *userdata, sd_bus_error *error) { _cleanup_(dns_question_unrefp) DnsQuestion *question_idna = NULL, *question_utf8 = NULL; const char *name, *type, *domain; - _cleanup_free_ char *n = NULL; Manager *m = userdata; int family, ifindex; uint64_t flags; diff --git a/src/resolve/test-dns-packet.c b/src/resolve/test-dns-packet.c index 1abbd3fa2e..c232a69ce1 100644 --- a/src/resolve/test-dns-packet.c +++ b/src/resolve/test-dns-packet.c @@ -89,7 +89,6 @@ static void test_packet_from_file(const char* filename, bool canonical) { int main(int argc, char **argv) { int i, N; _cleanup_globfree_ glob_t g = {}; - _cleanup_strv_free_ char **globs = NULL; char **fnames; log_parse_environment(); |