summaryrefslogtreecommitdiff
path: root/term/users.c
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2002-03-26 19:11:01 +0000
committerNeal H. Walfield <neal@gnu.org>2002-03-26 19:11:01 +0000
commite581cc5d90e80f713c9636bcb4a47cf9bbb73c23 (patch)
tree618720b825236e05bf3f7d254a81a2f765743e5b /term/users.c
parent927bf1d75bca2da6dee691ec851a5d6cec40125c (diff)
2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>
* main.c: Include <error.h>. (main): Use error, not fprintf and exit or perror and exit. Use ERR, not errno. Use MACH_PORT_NULL explicitly. * users.c: Include <error.h>. (init_users): Use ERR, not errno. Use error, not perror and exit.
Diffstat (limited to 'term/users.c')
-rw-r--r--term/users.c14
1 files changed, 7 insertions, 7 deletions
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 <stdio.h>
#include <hurd/iohelp.h>
#include <hurd/fshelp.h>
+#include <error.h>
#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);