Commit | Line | Data |
---|---|---|
e3cd9d9c EA |
1 | /* |
2 | * Copyright (c) 1988 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * This code is derived from software contributed to Berkeley by | |
6 | * Kenneth Almquist. | |
7 | * | |
8 | * %sccs.include.redist.c% | |
9 | */ | |
10 | ||
11 | #ifndef lint | |
7f867256 | 12 | static char copyright[] = |
e3cd9d9c EA |
13 | "@(#) Copyright (c) 1988 The Regents of the University of California.\n\ |
14 | All rights reserved.\n"; | |
15 | #endif /* not lint */ | |
16 | ||
17 | #ifndef lint | |
7f867256 | 18 | static char sccsid[] = "@(#)stalloc.c 1.2 (Berkeley) %G%"; |
e3cd9d9c EA |
19 | #endif /* not lint */ |
20 | ||
21 | #include <stdio.h> | |
22 | #include <stdlib.h> | |
23 | ||
24 | void * | |
25 | stalloc(nbytes) | |
26 | int nbytes; | |
27 | { | |
28 | register void *p; | |
29 | ||
30 | if ((p = malloc(nbytes)) == NULL) | |
31 | error("Out of space"); | |
32 | return p; | |
33 | } |