In example of getgrouplist, if getpwnam returns NULL, the program exits. The exit code EXIT_SUCCESS looks like a mistake, since the program also calls perror right before. This patch changes the exit code to EXIT_FAILURE. Best regards, Fedor. --- man3/getgrouplist.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/getgrouplist.3 b/man3/getgrouplist.3 index 41389b6c3..239913ce6 100644 --- a/man3/getgrouplist.3 +++ b/man3/getgrouplist.3 @@ -165,7 +165,7 @@ main(int argc, char *argv[]) pw = getpwnam(argv[1]); if (pw == NULL) { perror("getpwnam"); - exit(EXIT_SUCCESS); + exit(EXIT_FAILURE); } \& /* Retrieve group list. */ -- 2.34.1