diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/path-util.c | 5 | ||||
-rw-r--r-- | src/shared/util.h | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/shared/path-util.c b/src/shared/path-util.c index b1f997aef3..152fef9b24 100644 --- a/src/shared/path-util.c +++ b/src/shared/path-util.c @@ -315,10 +315,7 @@ bool path_equal(const char *a, const char *b) { int path_is_mount_point(const char *t, bool allow_symlink) { - union file_handle_union h = { - .handle.handle_bytes = MAX_HANDLE_SZ - }; - + union file_handle_union h = FILE_HANDLE_INIT; int mount_id = -1, mount_id_parent = -1; _cleanup_free_ char *parent = NULL; struct stat a, b; diff --git a/src/shared/util.h b/src/shared/util.h index 3fceb18841..8b7d37d73c 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -461,6 +461,7 @@ union file_handle_union { struct file_handle handle; char padding[sizeof(struct file_handle) + MAX_HANDLE_SZ]; }; +#define FILE_HANDLE_INIT { .handle.handle_bytes = MAX_HANDLE_SZ } int tempfn_xxxxxx(const char *p, char **ret); |