From: Luca Boccassi Date: Mon, 25 Mar 2024 12:05:28 +0000 (+0000) Subject: test: add missing return value check in test-dirent-util X-Git-Tag: v256-rc1~410^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F31932%2Fhead;p=thirdparty%2Fsystemd.git test: add missing return value check in test-dirent-util CID#1540029 Follow-up for 6a57d86bf9d7f8d6f5d339f57665dfb2e1d191c5 --- diff --git a/src/test/test-dirent-util.c b/src/test/test-dirent-util.c index f9816973bfc..be0496904f8 100644 --- a/src/test/test-dirent-util.c +++ b/src/test/test-dirent-util.c @@ -23,10 +23,8 @@ TEST (test_dirent_ensure_type) { .d_name = "test", }; - assert_se(de.d_type == DT_UNKNOWN); - dir_fd = 0; - dirent_ensure_type(dir_fd, &de); + assert_se(dirent_ensure_type(dir_fd, &de) == -ENOTDIR); /* Test when d_name is "." or ".." */ strcpy(de.d_name, ".");