summaryrefslogtreecommitdiffstats
path: root/src/shared/open-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/open-file.c')
-rw-r--r--src/shared/open-file.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/shared/open-file.c b/src/shared/open-file.c
index 7d7a8a9..a9c2a11 100644
--- a/src/shared/open-file.c
+++ b/src/shared/open-file.c
@@ -1,4 +1,3 @@
-
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <fcntl.h>
@@ -23,7 +22,7 @@ int open_file_parse(const char *v, OpenFile **ret) {
if (!of)
return -ENOMEM;
- r = extract_many_words(&v, ":", EXTRACT_DONT_COALESCE_SEPARATORS|EXTRACT_CUNESCAPE, &of->path, &of->fdname, &options, NULL);
+ r = extract_many_words(&v, ":", EXTRACT_DONT_COALESCE_SEPARATORS|EXTRACT_CUNESCAPE, &of->path, &of->fdname, &options);
if (r < 0)
return r;
if (r == 0)
@@ -122,19 +121,14 @@ int open_file_to_string(const OpenFile *of, char **ret) {
return 0;
}
-OpenFile *open_file_free(OpenFile *of) {
+OpenFile* open_file_free(OpenFile *of) {
if (!of)
return NULL;
free(of->path);
free(of->fdname);
- return mfree(of);
-}
-void open_file_free_many(OpenFile **head) {
- assert(head);
-
- LIST_CLEAR(open_files, *head, open_file_free);
+ return mfree(of);
}
static const char * const open_file_flags_table[_OPENFILE_MAX] = {