summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/util.c18
-rw-r--r--src/shared/util.h2
2 files changed, 0 insertions, 20 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index cf9d487b82..502b3675b1 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -4981,24 +4981,6 @@ bool kexec_loaded(void) {
return loaded;
}
-int strdup_or_null(const char *a, char **b) {
- char *c;
-
- assert(b);
-
- if (!a) {
- *b = NULL;
- return 0;
- }
-
- c = strdup(a);
- if (!c)
- return -ENOMEM;
-
- *b = c;
- return 0;
-}
-
int prot_from_flags(int flags) {
switch (flags & O_ACCMODE) {
diff --git a/src/shared/util.h b/src/shared/util.h
index 3401280d09..08d556fc92 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -583,8 +583,6 @@ int block_get_whole_disk(dev_t d, dev_t *ret);
int file_is_priv_sticky(const char *p);
-int strdup_or_null(const char *a, char **b);
-
#define NULSTR_FOREACH(i, l) \
for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1)