]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fs-util: use RET_GATHER at one more place
authorMike Yuan <me@yhndnzj.com>
Mon, 20 May 2024 11:17:22 +0000 (19:17 +0800)
committerMike Yuan <me@yhndnzj.com>
Tue, 21 May 2024 16:48:51 +0000 (00:48 +0800)
src/basic/fs-util.c

index 5632736eedf504456ec323d1f5820020ccbb115b..6bb4587f817bb73d36e335d5d34f43953effee0f 100644 (file)
@@ -633,11 +633,11 @@ static int tmp_dir_internal(const char *def, const char **ret) {
                 return 0;
         }
 
-        k = is_dir(def, true);
+        k = is_dir(def, /* follow = */ true);
         if (k == 0)
                 k = -ENOTDIR;
         if (k < 0)
-                return r < 0 ? r : k;
+                return RET_GATHER(r, k);
 
         *ret = def;
         return 0;