Add initialization helper for file_handle_union
This commit is contained in:
@@ -454,10 +454,7 @@ char* path_join(const char *root, const char *path, const char *rest) {
|
||||
|
||||
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;
|
||||
|
||||
@@ -993,6 +993,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 update_reboot_param_file(const char *param);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user