diff options
author | Shawn Landden <shawn@churchofgit.com> | 2013-12-15 16:56:21 -0800 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-17 21:45:43 +0100 |
commit | 73020ab241866dce79b80cbebcaae537470c7086 (patch) | |
tree | 5f74eeefca44a2f3f21932fafd399b1e20a8d9d8 /src/shared | |
parent | ec202eae8e84a4c99f054f771cb832046cb8769f (diff) |
util: no need for in_initrd() cache to be thread-local
the process only has one working directory, and a race is
harmless
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index f7335cf279..80dbf73c94 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -2737,9 +2737,9 @@ int rm_rf_children_dangerous(int fd, bool only_dirs, bool honour_sticky, struct _pure_ static int is_temporary_fs(struct statfs *s) { assert(s); - return - F_TYPE_EQUAL(s->f_type, TMPFS_MAGIC) || - F_TYPE_EQUAL(s->f_type, RAMFS_MAGIC); + + return F_TYPE_EQUAL(s->f_type, TMPFS_MAGIC) || + F_TYPE_EQUAL(s->f_type, RAMFS_MAGIC); } int rm_rf_children(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev) { @@ -5154,7 +5154,7 @@ bool is_valid_documentation_url(const char *url) { } bool in_initrd(void) { - static __thread int saved = -1; + static int saved = -1; struct statfs s; if (saved >= 0) |