]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: make more global variables static 2603/head
authorLennart Poettering <lennart@poettering.net>
Sat, 13 Feb 2016 11:28:28 +0000 (12:28 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 13 Feb 2016 11:28:28 +0000 (12:28 +0100)
let's export as little as we can

src/basic/mempool.h
src/cgtop/cgtop.c
src/rc-local-generator/rc-local-generator.c
src/sysv-generator/sysv-generator.c

index fea7841bcff8ebe0fd097f6869bfaf59088b39db..0618b8dd223c8b7de0fcb2b88545aaa7844b7b69 100644 (file)
@@ -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, \
 }
index 60d6da3246ea6c4fcf73e87663d38635985ca3c8..9c0e82ebb3e675c20f6bcdd64978e4b9ab664aab 100644 (file)
@@ -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,
index 9e9c1619936b79f8dd22a973bf7b0cd5bdfeba9f..618bbe428de08d9c84a14243a32d93f6712054a9 100644 (file)
@@ -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;
index 5a6818a79d72d05cdf4cc83c81602c16051b18e8..b5925a47dc9bf03f2e326d5806dc501a6982eadb 100644 (file)
@@ -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;