]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/copy: vodify unlinkat() call 17055/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 14 Sep 2020 20:34:43 +0000 (22:34 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 14 Sep 2020 20:34:43 +0000 (22:34 +0200)
Not much we can do at this point.

Coverity CID#1432670.

src/basic/copy.c

index 6c1d045ea903db7244e0a92aa3ef96efbbeee2de..69aafbe21a57e3bf2d6caad8aecbca92ad8a0cd8 100644 (file)
@@ -482,7 +482,7 @@ static int hardlink_context_realize(HardlinkContext *c) {
         c->dir_fd = openat(c->parent_fd, c->subdir, O_RDONLY|O_DIRECTORY|O_CLOEXEC);
         if (c->dir_fd < 0) {
                 r = -errno;
-                unlinkat(c->parent_fd, c->subdir, AT_REMOVEDIR);
+                (void) unlinkat(c->parent_fd, c->subdir, AT_REMOVEDIR);
                 return r;
         }