summaryrefslogtreecommitdiff
path: root/server/common.c
blob: 2a99cf606c88005253a2637a56f04334fd3efc6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 *	$Source$
 *	$Header$
 */

#ifndef lint
static char *rcsid_common_c = "$Header$";
#endif lint

/* common routines */

#include <zephyr/mit-copyright.h>
#include <stdio.h>

char *
strsave(sp) char *sp;
{
    register char *ret;

    if((ret = (char *) malloc(strlen(sp)+1)) == NULL) {
	error("out of memory in strsave()\n");
	return(NULL);
    }
    strcpy(ret,sp);
    return(ret);
}