Commited, thanks!
On Sun, Nov 09, 2014 at 08:40:03PM +0100, Martin Natano wrote:
> mg(1) calls 'exit(1)' on failure, but 'exit(GOOD)' on success. In my
> opinion it would be more readable to just use 'exit(0)' for a normal
> exit. (If there really is the need for a define, EXIT_SUCCESS would be a
> better fit anyways, and EXIT_* should be applied consistently.)
> Also, the MALLOCROUND() macro is unused and can be removed.
>
> See diff below; no binary change.
>
> cheers,
> natano
>
>
> Index: main.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/mg/main.c,v
> retrieving revision 1.72
> diff -u -r1.72 main.c
> --- main.c 22 Mar 2014 11:05:37 -0000 1.72
> +++ main.c 9 Nov 2014 19:19:24 -0000
> @@ -235,7 +235,7 @@
> || eyesno("Modified buffers exist; really exit") == TRUE) {
> vttidy();
> closetags();
> - exit(GOOD);
> + exit(0);
> }
> return (TRUE);
> }
> Index: sysdef.h
> ===================================================================
> RCS file: /cvs/src/usr.bin/mg/sysdef.h,v
> retrieving revision 1.16
> diff -u -r1.16 sysdef.h
> --- sysdef.h 15 Sep 2008 16:11:35 -0000 1.16
> +++ sysdef.h 9 Nov 2014 19:19:14 -0000
> @@ -15,12 +15,9 @@
> #include <signal.h>
>
> #define KBLOCK 8192 /* Kill grow. */
> -#define GOOD 0 /* Good exit status. */
>
> typedef int RSIZE; /* Type for file/region sizes */
> typedef short KCHAR; /* Type for internal keystrokes */
> -
> -#define MALLOCROUND(m) (m+=7,m&=~7) /* round up to 8 byte boundary
> */
>
> struct fileinfo {
> uid_t fi_uid;
>
--
I'm not entirely sure you are real.