diff options
Diffstat (limited to 'usr.bin/xlint/lint1')
-rw-r--r-- | usr.bin/xlint/lint1/decl.c | 6 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/err.c | 5 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/externs.h | 3 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/lint.h | 4 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/lint1.h | 4 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/mem.c | 18 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/mem1.c | 5 |
7 files changed, 19 insertions, 26 deletions
diff --git a/usr.bin/xlint/lint1/decl.c b/usr.bin/xlint/lint1/decl.c index ff017b9deb0..449baa6b2b7 100644 --- a/usr.bin/xlint/lint1/decl.c +++ b/usr.bin/xlint/lint1/decl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: decl.c,v 1.19 2005/12/18 19:21:02 cloder Exp $ */ +/* $OpenBSD: decl.c,v 1.20 2006/03/08 07:18:51 moritz Exp $ */ /* $NetBSD: decl.c,v 1.11 1995/10/02 17:34:16 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: decl.c,v 1.19 2005/12/18 19:21:02 cloder Exp $"; +static char rcsid[] = "$OpenBSD: decl.c,v 1.20 2006/03/08 07:18:51 moritz Exp $"; #endif #include <sys/param.h> @@ -48,7 +48,7 @@ const char *unnamed = "<unnamed>"; /* contains various information and classification on types */ ttab_t ttab[NTSPEC]; -/* shared type structures for arithmtic types and void */ +/* shared type structures for arithmetic types and void */ static type_t *typetab; /* value of next enumerator during declaration of enum types */ diff --git a/usr.bin/xlint/lint1/err.c b/usr.bin/xlint/lint1/err.c index 33e5ebb17de..fc464fc6205 100644 --- a/usr.bin/xlint/lint1/err.c +++ b/usr.bin/xlint/lint1/err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: err.c,v 1.18 2006/01/16 22:16:14 espie Exp $ */ +/* $OpenBSD: err.c,v 1.19 2006/03/08 07:18:51 moritz Exp $ */ /* $NetBSD: err.c,v 1.8 1995/10/02 17:37:00 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: err.c,v 1.18 2006/01/16 22:16:14 espie Exp $"; +static char rcsid[] = "$OpenBSD: err.c,v 1.19 2006/03/08 07:18:51 moritz Exp $"; #endif /* number of errors found */ @@ -44,6 +44,7 @@ int sytxerr; #include <stdlib.h> #include <stdarg.h> +#include <err.h> #include "lint1.h" diff --git a/usr.bin/xlint/lint1/externs.h b/usr.bin/xlint/lint1/externs.h index afbdbb58fd9..a8834ab559f 100644 --- a/usr.bin/xlint/lint1/externs.h +++ b/usr.bin/xlint/lint1/externs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: externs.h,v 1.3 2002/02/16 21:27:59 millert Exp $ */ +/* $OpenBSD: externs.h,v 1.4 2006/03/08 07:18:51 moritz Exp $ */ /* $NetBSD: externs.h,v 1.2 1995/07/03 21:24:06 cgd Exp $ */ /* @@ -39,7 +39,6 @@ extern void *xmalloc(size_t); extern void *xcalloc(size_t, size_t); extern void *xrealloc(void *, size_t); extern char *xstrdup(const char *); -extern void nomem(void); /* * emit.c diff --git a/usr.bin/xlint/lint1/lint.h b/usr.bin/xlint/lint1/lint.h index 45c61902477..ff2589e1777 100644 --- a/usr.bin/xlint/lint1/lint.h +++ b/usr.bin/xlint/lint1/lint.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lint.h,v 1.3 2005/12/10 18:51:54 martin Exp $ */ +/* $OpenBSD: lint.h,v 1.4 2006/03/08 07:18:51 moritz Exp $ */ /* $NetBSD: lint.h,v 1.2 1995/07/03 21:24:18 cgd Exp $ */ /* @@ -39,7 +39,7 @@ #include "param.h" /* - * Type specifiers, used in type structures (type_t) and otherwere. + * Type specifiers, used in type structures (type_t) and elsewhere. */ typedef enum { NOTSPEC, diff --git a/usr.bin/xlint/lint1/lint1.h b/usr.bin/xlint/lint1/lint1.h index 758c25cc93a..d6ef4fb9dd7 100644 --- a/usr.bin/xlint/lint1/lint1.h +++ b/usr.bin/xlint/lint1/lint1.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lint1.h,v 1.11 2005/12/17 21:08:27 cloder Exp $ */ +/* $OpenBSD: lint1.h,v 1.12 2006/03/08 07:18:51 moritz Exp $ */ /* $NetBSD: lint1.h,v 1.6 1995/10/02 17:31:41 jpo Exp $ */ /* @@ -90,7 +90,7 @@ typedef struct { * Structures of type str_t uniqely identify structures. This can't * be done in structures of type type_t, because these are copied * if they must be modified. So it would not be possible to check - * if to structures are identical by comparing the pointers to + * if two structures are identical by comparing the pointers to * the type structures. * * The typename is used if the structure is unnamed to identify diff --git a/usr.bin/xlint/lint1/mem.c b/usr.bin/xlint/lint1/mem.c index e91772d85d7..0fce3f26362 100644 --- a/usr.bin/xlint/lint1/mem.c +++ b/usr.bin/xlint/lint1/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.3 2005/11/19 03:35:27 cloder Exp $ */ +/* $OpenBSD: mem.c,v 1.4 2006/03/08 07:18:51 moritz Exp $ */ /* $NetBSD: mem.c,v 1.2 1995/07/03 21:24:24 cgd Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: mem.c,v 1.3 2005/11/19 03:35:27 cloder Exp $"; +static char rcsid[] = "$OpenBSD: mem.c,v 1.4 2006/03/08 07:18:51 moritz Exp $"; #endif #include <stdlib.h> @@ -48,7 +48,7 @@ xmalloc(size_t s) void *p; if ((p = malloc(s)) == NULL) - nomem(); + err(1, NULL); return (p); } @@ -58,7 +58,7 @@ xcalloc(size_t n, size_t s) void *p; if ((p = calloc(n, s)) == NULL) - nomem(); + err(1, NULL); return (p); } @@ -66,7 +66,7 @@ void * xrealloc(void *p, size_t s) { if ((p = realloc(p, s)) == NULL) - nomem(); + err(1, NULL); return (p); } @@ -76,12 +76,6 @@ xstrdup(const char *s) char *s2; if ((s2 = strdup(s)) == NULL) - nomem(); + err(1, NULL); return (s2); } - -void -nomem(void) -{ - errx(1, "virtual memory exhausted"); -} diff --git a/usr.bin/xlint/lint1/mem1.c b/usr.bin/xlint/lint1/mem1.c index 9a67ac76e35..d31bdabfb9d 100644 --- a/usr.bin/xlint/lint1/mem1.c +++ b/usr.bin/xlint/lint1/mem1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem1.c,v 1.9 2005/11/29 20:09:39 cloder Exp $ */ +/* $OpenBSD: mem1.c,v 1.10 2006/03/08 07:18:51 moritz Exp $ */ /* $NetBSD: mem1.c,v 1.2 1995/07/03 21:24:25 cgd Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: mem1.c,v 1.9 2005/11/29 20:09:39 cloder Exp $"; +static char rcsid[] = "$OpenBSD: mem1.c,v 1.10 2006/03/08 07:18:51 moritz Exp $"; #endif #include <sys/types.h> @@ -166,7 +166,6 @@ static mbl_t * xnewblk(void) { mbl_t *mb; - int prot, flags; mb = xmalloc(sizeof (mbl_t)); mb->blk = xmalloc(mblklen); |