]> granicus.if.org Git - strace/commitdiff
tests: use sprintrc in vhangup.test
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 5 Sep 2016 13:59:08 +0000 (13:59 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 5 Sep 2016 15:58:35 +0000 (15:58 +0000)
* tests/vhangup.c (main): Use sprintrc.

tests/vhangup.c

index f656e705924cc19344def23cc93d7341eaf95765..e7ddabba23a350c98505ca14011d1f0888d40c4b 100644 (file)
@@ -21,10 +21,7 @@ main(void)
         * The system call, however, returns 0 iff the calling process
         * has CAP_SYS_TTY_CONFIG capability.
         */
-       if (rc)
-               printf("vhangup() = %ld %s (%m)\n", rc, errno2name());
-       else
-               puts("vhangup() = 0");
+       printf("vhangup() = %s\n", sprintrc(rc));
 
        puts("+++ exited with 0 +++");
        return 0;