summaryrefslogtreecommitdiff
path: root/games/hack/alloc.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-14 22:06:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-14 22:06:11 +0000
commit12d21cf3205e9cd0013f946d3c8dfcd1ad1e1c7f (patch)
tree413594692aae4817da2cb78a9f8ae83502d1e10a /games/hack/alloc.c
parent4253e24a5b12b5e21f53901fff170ccf01251e0b (diff)
delete lint balony from another era; adobriyan@gmail, ok tedu
Diffstat (limited to 'games/hack/alloc.c')
-rw-r--r--games/hack/alloc.c33
1 files changed, 5 insertions, 28 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 */