mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 06:25:37 +03:00
mountpoint-util: use memcmp_nn() where appropriate
This commit is contained in:
parent
524ea5852a
commit
d230d4770d
@ -271,9 +271,9 @@ int fd_is_mount_point(int fd, const char *filename, int flags) {
|
||||
/* If the file handle for the directory we are interested in and its parent are identical,
|
||||
* we assume this is the root directory, which is a mount point. */
|
||||
|
||||
if (h->handle_bytes == h_parent->handle_bytes &&
|
||||
h->handle_type == h_parent->handle_type &&
|
||||
memcmp(h->f_handle, h_parent->f_handle, h->handle_bytes) == 0)
|
||||
if (h->handle_type == h_parent->handle_type &&
|
||||
memcmp_nn(h->f_handle, h->handle_bytes,
|
||||
h_parent->f_handle, h_parent->handle_bytes) == 0)
|
||||
return 1;
|
||||
|
||||
return mount_id != mount_id_parent;
|
||||
|
Loading…
Reference in New Issue
Block a user