chiark / gitweb /
test-process-util: add (void) cast to make coverity happy
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 27 Nov 2017 21:52:32 +0000 (21:52 +0000)
committerSven Eden <yamakuzure@gmx.net>
Mon, 27 Nov 2017 21:52:32 +0000 (21:52 +0000)
The intent is for the call to succeed only when privileged, so make
that clear.

src/test/test-process-util.c

index c573f4127154a6a5432ece081b59fc8adb6ff5a7..fb2cce77776baffe0a942837be91ba2b12dd0f92 100644 (file)
@@ -433,7 +433,7 @@ static void test_rename_process_multi(void) {
         /* child */
         test_rename_process_now("one", 1);
         test_rename_process_now("more", 0); /* longer than "one", hence truncated */
-        setresuid(99, 99, 99);
+        (void) setresuid(99, 99, 99); /* change uid when running privileged */
         test_rename_process_now("time!", 0);
         test_rename_process_now("0", 1); /* shorter than "one", should fit */
         test_rename_process_one("", -EINVAL);