request_key.2: Remove errExit() from example program

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-11-09 00:37:29 +01:00
parent 6052344b05
commit 4051799cd8
1 changed files with 4 additions and 5 deletions

View File

@ -412,9 +412,6 @@ For another example of the use of this program, see
#include <stdlib.h>
#include <string.h>
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\
} while (0)
int
main(int argc, char *argv[])
{
@ -428,8 +425,10 @@ main(int argc, char *argv[])
key = request_key(argv[1], argv[2], argv[3],
KEY_SPEC_SESSION_KEYRING);
if (key == \-1)
errExit("request_key");
if (key == \-1) {
perror("request_key");
exit(EXIT_FAILURE);
}
printf("Key ID is %lx\\n", (long) key);