diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-09-03 22:53:23 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-09-03 22:53:23 -0400 |
commit | af76d302c1e26f916494202f1b3663f15710bdcd (patch) | |
tree | 83f24475efb80ce2480ca0f83c9e27dbc3a2fd7a /src/shared | |
parent | 28efac0d37ceb5093a804da6a00c620034c5484f (diff) |
localed: remove free_and_copy
It was mostly a duplicate of free_and_strdup().
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/util.c | 18 | ||||
-rw-r--r-- | src/shared/util.h | 2 |
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) |