diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-13 12:28:28 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-02-13 12:28:28 +0100 |
commit | dd422d1e5b6a62bc634ae22d0627f70d4900814b (patch) | |
tree | 6772b1bb6db5cfc788339f4fe397c1ec3fd305e0 /src | |
parent | util: drop two unused calls from src/basic/ (diff) | |
download | systemd-dd422d1e5b6a62bc634ae22d0627f70d4900814b.tar.xz systemd-dd422d1e5b6a62bc634ae22d0627f70d4900814b.zip |
tree-wide: make more global variables static
let's export as little as we can
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/mempool.h | 2 | ||||
-rw-r--r-- | src/cgtop/cgtop.c | 4 | ||||
-rw-r--r-- | src/rc-local-generator/rc-local-generator.c | 2 | ||||
-rw-r--r-- | src/sysv-generator/sysv-generator.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/basic/mempool.h b/src/basic/mempool.h index fea7841bcf..0618b8dd22 100644 --- a/src/basic/mempool.h +++ b/src/basic/mempool.h @@ -36,7 +36,7 @@ void* mempool_alloc0_tile(struct mempool *mp); void mempool_free_tile(struct mempool *mp, void *p); #define DEFINE_MEMPOOL(pool_name, tile_type, alloc_at_least) \ -struct mempool pool_name = { \ +static struct mempool pool_name = { \ .tile_size = sizeof(tile_type), \ .at_least = alloc_at_least, \ } diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index 60d6da3246..9c0e82ebb3 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -72,13 +72,13 @@ static bool arg_batch = false; static bool arg_raw = false; static usec_t arg_delay = 1*USEC_PER_SEC; static char* arg_machine = NULL; +static bool arg_recursive = true; -enum { +static enum { COUNT_PIDS, COUNT_USERSPACE_PROCESSES, COUNT_ALL_PROCESSES, } arg_count = COUNT_PIDS; -static bool arg_recursive = true; static enum { ORDER_PATH, diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c index 9e9c161993..618bbe428d 100644 --- a/src/rc-local-generator/rc-local-generator.c +++ b/src/rc-local-generator/rc-local-generator.c @@ -36,7 +36,7 @@ #define RC_LOCAL_SCRIPT_PATH_STOP "/sbin/halt.local" #endif -const char *arg_dest = "/tmp"; +static const char *arg_dest = "/tmp"; static int add_symlink(const char *service, const char *where) { _cleanup_free_ char *from = NULL, *to = NULL; diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c index 5a6818a79d..b5925a47dc 100644 --- a/src/sysv-generator/sysv-generator.c +++ b/src/sysv-generator/sysv-generator.c @@ -70,7 +70,7 @@ static const struct { UP must be read before DOWN */ }; -const char *arg_dest = "/tmp"; +static const char *arg_dest = "/tmp"; typedef struct SysvStub { char *name; |