From e581cc5d90e80f713c9636bcb4a47cf9bbb73c23 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Tue, 26 Mar 2002 19:11:01 +0000 Subject: 2002-03-23 James A. Morrison * main.c: Include . (main): Use error, not fprintf and exit or perror and exit. Use ERR, not errno. Use MACH_PORT_NULL explicitly. * users.c: Include . (init_users): Use ERR, not errno. Use error, not perror and exit. --- term/users.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'term/users.c') diff --git a/term/users.c b/term/users.c index cc3f4acc..c0eb6f7c 100644 --- a/term/users.c +++ b/term/users.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "ourmsg_U.h" @@ -84,13 +85,12 @@ struct protid_hook void init_users () { - errno = ports_create_port (cttyid_class, term_bucket, - sizeof (struct port_info), &cttyid); - if (errno) - { - perror ("Allocating cttyid"); - exit (1); - } + error_t err; + + err = ports_create_port (cttyid_class, term_bucket, + sizeof (struct port_info), &cttyid); + if (err) + error (1, err, "Allocating cttyid"); mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &async_icky_id); -- cgit v1.2.3