summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-30 20:19:44 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-30 20:19:44 -0700
commitedca92c10572b6bb7dd60db156f545d98373f803 (patch)
tree0f22fb5c4203c48c2a8d7f6a71692f9b689d791d /common.c
parent93812aa7950342c809a9dcbd9d50379c050b51ac (diff)
downloadxscope-edca92c10572b6bb7dd60db156f545d98373f803.tar.gz
Stop wrapping malloc & free
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'common.c')
-rw-r--r--common.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/common.c b/common.c
index bf64beb..1baf288 100644
--- a/common.c
+++ b/common.c
@@ -76,32 +76,6 @@ panic (char *s)
exit(1);
}
-/* ********************************************** */
-/* */
-/* Debugging forms of memory management */
-/* */
-/* ********************************************** */
-
-void *
-Malloc (long n)
-{
- void *p;
- p = malloc(n);
- debug(64,(stderr, "%lx = malloc(%ld)\n", (unsigned long) p, n));
- if (p == NULL)
- panic("no more malloc space");
- return(p);
-}
-
-void
-Free(void *p)
-{
- debug(64,(stderr, "%lx = free\n", (unsigned long) p));
- free(p);
-}
-
-
-
/* ************************************************************ */
/* */
/* Signal Handling support */
@@ -288,7 +262,9 @@ SetUpConnectionSocket(
struct hostent *hp;
(void) gethostname(MyHostName, sizeof(MyHostName));
- ScopeHost = (char *) Malloc((long)(1+strlen(MyHostName)));
+ ScopeHost = malloc((1+strlen(MyHostName)));
+ if (ScopeHost == NULL)
+ panic("Can't allocate memory for hostname");
strcpy(ScopeHost, MyHostName);
hp = gethostbyname(MyHostName);
if (hp == NULL)