chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unifiy free() usage
[elogind.git]
/
src
/
basic
/
util.c
diff --git
a/src/basic/util.c
b/src/basic/util.c
index 38de72966ed7c606eaec020b938471100eb660f8..7e0a913f51c88bc97247e14058984ea9cc0c5f7c 100644
(file)
--- a/
src/basic/util.c
+++ b/
src/basic/util.c
@@
-72,7
+72,7
@@
#include "config.h"
#include "macro.h"
#include "util.h"
#include "config.h"
#include "macro.h"
#include "util.h"
-#include "ioprio.h"
+
//
#include "ioprio.h"
// #include "missing.h"
// #include "log.h"
#include "strv.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;
}
a.st_ino == b.st_ino;
}
-/// UNNEEDED by elogind
-#if 0
int running_in_chroot(void) {
int ret;
int running_in_chroot(void) {
int ret;
@@
-2579,7
+2577,6
@@
int running_in_chroot(void) {
return ret == 0;
}
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;
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;
}
return -ENOENT;
}
-#endif // 0
static const char *const ioprio_class_table[] = {
[IOPRIO_CLASS_NONE] = "none",
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);
};
DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(ioprio_class, int, INT_MAX);
+#endif // 0
static const char *const sigchld_code_table[] = {
[CLD_EXITED] = "exited",
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;
}
return 0;
}
-#endif // 0
static char *strcpy_backslash_escaped(char *t, const char *s, const char *bad) {
assert(bad);
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;
}
return r;
}
+#endif // 0
int parse_mode(const char *s, mode_t *ret) {
char *x;
int parse_mode(const char *s, mode_t *ret) {
char *x;