chiark / gitweb /
Unifiy free() usage
[elogind.git] / src / basic / util.c
index 38de72966ed7c606eaec020b938471100eb660f8..7e0a913f51c88bc97247e14058984ea9cc0c5f7c 100644 (file)
@@ -72,7 +72,7 @@
 #include  "config.h"
 #include  "macro.h"
 #include  "util.h"
-#include  "ioprio.h"
+// #include  "ioprio.h"
 // #include  "missing.h"
 // #include  "log.h"
 #include  "strv.h"
@@ -2568,8 +2568,6 @@ int files_same(const char *filea, const char *fileb) {
                a.st_ino == b.st_ino;
 }
 
-/// UNNEEDED by elogind
-#if 0
 int running_in_chroot(void) {
         int ret;
 
@@ -2579,7 +2577,6 @@ int running_in_chroot(void) {
 
         return ret == 0;
 }
-#endif // 0
 
 static char *ascii_ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent) {
         size_t x;
@@ -3680,7 +3677,6 @@ int block_get_whole_disk(dev_t d, dev_t *ret) {
 
         return -ENOENT;
 }
-#endif // 0
 
 static const char *const ioprio_class_table[] = {
         [IOPRIO_CLASS_NONE] = "none",
@@ -3690,6 +3686,7 @@ static const char *const ioprio_class_table[] = {
 };
 
 DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(ioprio_class, int, INT_MAX);
+#endif // 0
 
 static const char *const sigchld_code_table[] = {
         [CLD_EXITED] = "exited",
@@ -6674,7 +6671,6 @@ int rename_noreplace(int olddirfd, const char *oldpath, int newdirfd, const char
 
         return 0;
 }
-#endif // 0
 
 static char *strcpy_backslash_escaped(char *t, const char *s, const char *bad) {
         assert(bad);
@@ -6735,6 +6731,7 @@ char *shell_maybe_quote(const char *s) {
 
         return r;
 }
+#endif // 0
 
 int parse_mode(const char *s, mode_t *ret) {
         char *x;