summaryrefslogtreecommitdiffstats
path: root/sbin/routed/parms.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/routed/parms.c')
-rw-r--r--sbin/routed/parms.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sbin/routed/parms.c b/sbin/routed/parms.c
index 287a82f..9e1cbce 100644
--- a/sbin/routed/parms.c
+++ b/sbin/routed/parms.c
@@ -31,18 +31,18 @@
* SUCH DAMAGE.
*/
-#if !defined(lint) && !defined(sgi) && !defined(__NetBSD__)
+#ifndef lint
+#if 0
static char sccsid[] = "@(#)if.c 8.1 (Berkeley) 6/5/93";
-#elif defined(__NetBSD__)
-static char rcsid[] = "$NetBSD$";
#endif
-#ident "$Revision: 1.2 $"
+static const char rcsid[] =
+ "$Id$";
+#endif /* not lint */
#include "defs.h"
#include "pathnames.h"
#include <sys/stat.h>
-
struct parm *parms;
struct intnet *intnets;
struct tgate *tgates;
@@ -311,7 +311,7 @@ gwkludge(void)
continue;
}
- ifp = (struct interface *)malloc(sizeof(*ifp));
+ ifp = (struct interface *)rtmalloc(sizeof(*ifp), "gwkludge");
bzero(ifp, sizeof(*ifp));
ifp->int_state = state;
@@ -558,7 +558,8 @@ parse_parms(char *line,
/* "subnet=x.y.z.u/mask,metric" must be alone on the line */
if (!strncasecmp(line, "subnet=", sizeof("subnet=")-1)
&& *(val = &line[sizeof("subnet=")-1]) != '\0') {
- intnetp = (struct intnet*)malloc(sizeof(*intnetp));
+ intnetp = (struct intnet*)
+ rtmalloc(sizeof(*intnetp), "parse_parms");
intnetp->intnet_metric = 1;
if ((p = strrchr(val,','))) {
*p++ = '\0';
@@ -715,7 +716,8 @@ parse_parms(char *line,
} else if (PARSEQ("trust_gateway")) {
if (!gethost(buf,&addr))
return tgt;
- tg = (struct tgate *)malloc(sizeof(*tg));
+ tg = (struct tgate *)
+ rtmalloc(sizeof(*tg), "parse_parms");
tg->tgate_next = tgates;
tg->tgate_addr = addr;
tgates = tg;
@@ -802,7 +804,7 @@ check_parms(struct parm *new)
/* link new entry on the so that when the entries are scanned,
* they affect the result in the order the operator specified.
*/
- parmp = (struct parm*)malloc(sizeof(*parmp));
+ parmp = (struct parm*)rtmalloc(sizeof(*parmp), "check_parms");
bcopy(new, parmp, sizeof(*parmp));
*parmpp = parmp;
OpenPOWER on IntegriCloud