[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: zealous use of error
From: |
Neal H Walfield |
Subject: |
Re: zealous use of error |
Date: |
25 Mar 2002 01:45:53 -0500 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 |
> @@ -1,5 +1,5 @@
> /* Run a program on the console, trying hard to get the console open.
> - Copyright (C) 1999, 2001 Free Software Foundation, Inc.
> + Copyright (C) 1999, 2001,02 Free Software Foundation, Inc.
In the future, you should use more consistent spacing.
> + if (err)
> {
> - error (0, errno, "%s", terminal);
> + error (0, err, "%s", terminal);
> continue;
> }
>
> - errno = file_set_translator (term, 0, FS_TRANS_SET, 0, 0, 0,
> + err = file_set_translator (term, 0, FS_TRANS_SET, 0, 0, 0,
> control,
> MACH_MSG_TYPE_COPY_SEND);
This line needs to be reindented.
> + peerclass, term_bucket, peercntl);
> + if (! err)
> {
> right = ports_get_send_right (*peercntl);
> - errno = file_set_translator (file, 0, FS_TRANS_EXCL | FS_TRANS_SET,
> + err = file_set_translator (file, 0, FS_TRANS_EXCL | FS_TRANS_SET,
> 0, 0, 0, right,
> MACH_MSG_TYPE_COPY_SEND);
Spacing.
> - 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");
We usually put an empty line between the declarations and the function
body.
> /* Server for S_IFSOCK nodes
> - Copyright (C) 1994, 1995, 2001 Free Software Foundation
> + Copyright (C) 1994, 1995, 2001, 02 Free Software Foundation
Try to be more consistent here. For instance:
+ Copyright (C) 1994,95,2001,02 Free Software Foundation
Other than that and what the others have said, it looks great.
- zealous use of error, James A Morrison, 2002/03/24
- Re: zealous use of error, Roland McGrath, 2002/03/24
- Re: zealous use of error, Thomas Bushnell, BSG, 2002/03/24
- Re: zealous use of error, Thomas Bushnell, BSG, 2002/03/24
- Re: zealous use of error,
Neal H Walfield <=
- Re: zealous use of error, Neal H Walfield, 2002/03/26