]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/mmapped nit: avoid a warning docs-warn-nit-8em7zd/deployments/8575
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 12 Feb 2026 09:44:41 +0000 (10:44 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 12 Feb 2026 10:31:37 +0000 (11:31 +0100)
https://gitlab.nic.cz/knot/knot-resolver/-/jobs/1660161#L80

lib/mmapped.c

index 0fdb76e88ce64ee3e3e9303156d040f762cf094f..47b635c375dcd4ed1b7cb81897cbacfc01d68e84 100644 (file)
@@ -147,7 +147,7 @@ void mmapped_deinit(struct mmapped *mmapped)
                 * Here we keep zero-size file not to accidentally remove the new file instead of the old one.
                 * Still truncating the file will cause currently starting processes waiting for read lock on the same file to fail,
                 * but such processes are not expected to exist. */
-               ftruncate(mmapped->fd, 0);
+               (void)!ftruncate(mmapped->fd, 0);
 
                fcntl_flock_whole(mmapped->fd, F_UNLCK, false);
        }