mirror of https://github.com/mkerrisk/man-pages
request_key.2: Remove errExit() from example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
6052344b05
commit
4051799cd8
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue