]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ipfilter/lib/assigndefined.c
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ipfilter / lib / assigndefined.c
1 /*
2  * Copyright (C) 2012 by Darren Reed.
3  *
4  * See the IPFILTER.LICENCE file for details on licencing.
5  *
6  * $Id: assigndefined.c,v 1.4.2.2 2012/07/22 08:04:24 darren_r Exp $
7  */
8
9 #include "ipf.h"
10
11 void assigndefined(env)
12         char *env;
13 {
14         char *s, *t;
15
16         if (env == NULL)
17                 return;
18
19         for (s = strtok(env, ";"); s != NULL; s = strtok(NULL, ";")) {
20                 t = strchr(s, '=');
21                 if (t == NULL)
22                         continue;
23                 *t++ = '\0';
24                 set_variable(s, t);
25                 *--t = '=';
26         }
27 }