diff options
author | Sergey Bugaev <bugaevc@serenityos.org> | 2020-06-16 22:01:50 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-17 15:02:03 +0200 |
commit | eb7af001526a93b2aebf80cac148acceca6e579f (patch) | |
tree | 6b62ce01d69e66ec13806a14995f3f70c9b90374 /Userland/test_io.cpp | |
parent | d89843f96fa7673f409bb8c33e043e2355b257f1 (diff) | |
download | serenity-eb7af001526a93b2aebf80cac148acceca6e579f.zip |
Userland: Use Core::File::read_link()
Diffstat (limited to 'Userland/test_io.cpp')
-rw-r--r-- | Userland/test_io.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/test_io.cpp b/Userland/test_io.cpp index d469edc58d..6aa104c308 100644 --- a/Userland/test_io.cpp +++ b/Userland/test_io.cpp @@ -27,6 +27,7 @@ #include <AK/Assertions.h> #include <AK/LogStream.h> #include <AK/Types.h> +#include <LibCore/File.h> #include <fcntl.h> #include <stdio.h> #include <string.h> @@ -212,9 +213,8 @@ void test_unlink_symlink() ASSERT_NOT_REACHED(); } - char buffer[PATH_MAX]; - rc = readlink("/tmp/linky", buffer, sizeof(buffer)); - ASSERT(rc == strlen("/proc/2/foo")); + auto target = Core::File::read_link("/tmp/linky"); + ASSERT(target == "/proc/2/foo"); rc = unlink("/tmp/linky"); if (rc < 0) { |