diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-03-14 22:06:11 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-03-14 22:06:11 +0000 |
commit | 12d21cf3205e9cd0013f946d3c8dfcd1ad1e1c7f (patch) | |
tree | 413594692aae4817da2cb78a9f8ae83502d1e10a /games/hack | |
parent | 4253e24a5b12b5e21f53901fff170ccf01251e0b (diff) |
delete lint balony from another era; adobriyan@gmail, ok tedu
Diffstat (limited to 'games/hack')
-rw-r--r-- | games/hack/alloc.c | 33 | ||||
-rw-r--r-- | games/hack/hack.h | 4 |
2 files changed, 7 insertions, 30 deletions
diff --git a/games/hack/alloc.c b/games/hack/alloc.c index 0094d86c07a..3b3b405f7a2 100644 --- a/games/hack/alloc.c +++ b/games/hack/alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alloc.c,v 1.5 2003/05/19 06:30:56 pjanzen Exp $ */ +/* $OpenBSD: alloc.c,v 1.6 2006/03/14 22:06:10 deraadt Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -62,41 +62,18 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: alloc.c,v 1.5 2003/05/19 06:30:56 pjanzen Exp $"; +static const char rcsid[] = "$OpenBSD: alloc.c,v 1.6 2006/03/14 22:06:10 deraadt Exp $"; #endif /* not lint */ -#ifdef LINT - -/* - a ridiculous definition, suppressing - "possible pointer alignment problem" for (long *) malloc() - "enlarg defined but never used" - "ftell defined (in <stdio.h>) but never used" - from lint -*/ -#include <stdio.h> -long * -alloc(unsigned int n) -{ - long dummy = ftell(stderr); - - if(n) dummy = 0; /* make sure arg is used */ - return(&dummy); -} - -#else - #include <stdlib.h> #include "hack.h" -long * +void * alloc(unsigned int lth) { - char *ptr; + void *ptr; if(!(ptr = malloc(lth))) panic("Cannot get %d bytes", lth); - return((long *) ptr); + return(ptr); } - -#endif /* LINT */ diff --git a/games/hack/hack.h b/games/hack/hack.h index 944967de06b..4ab2f2b0bdb 100644 --- a/games/hack/hack.h +++ b/games/hack/hack.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.h,v 1.8 2003/05/19 06:30:56 pjanzen Exp $*/ +/* $OpenBSD: hack.h,v 1.9 2006/03/14 22:06:10 deraadt Exp $*/ /* $NetBSD: hack.h,v 1.3 1995/03/23 08:30:21 cgd Exp $*/ /* @@ -214,7 +214,7 @@ extern char lock[PL_NSIZ+4]; /* alloc.c */ -long *alloc(unsigned int); +void *alloc(unsigned int); /* hack.apply.c */ int doapply(void); |