141edb306SCy Schubert /* 241edb306SCy Schubert * Copyright (C) 2012 by Darren Reed. 341edb306SCy Schubert * 441edb306SCy Schubert * See the IPFILTER.LICENCE file for details on licencing. 541edb306SCy Schubert * 641edb306SCy Schubert * $Id: assigndefined.c,v 1.4.2.2 2012/07/22 08:04:24 darren_r Exp $ 741edb306SCy Schubert */ 841edb306SCy Schubert 941edb306SCy Schubert #include "ipf.h" 1041edb306SCy Schubert 11*efeb8bffSCy Schubert void assigndefined(char * env)12*efeb8bffSCy Schubertassigndefined(char *env) 1341edb306SCy Schubert { 1441edb306SCy Schubert char *s, *t; 1541edb306SCy Schubert 1641edb306SCy Schubert if (env == NULL) 1741edb306SCy Schubert return; 1841edb306SCy Schubert 1941edb306SCy Schubert for (s = strtok(env, ";"); s != NULL; s = strtok(NULL, ";")) { 2041edb306SCy Schubert t = strchr(s, '='); 2141edb306SCy Schubert if (t == NULL) 2241edb306SCy Schubert continue; 2341edb306SCy Schubert *t++ = '\0'; 2441edb306SCy Schubert set_variable(s, t); 2541edb306SCy Schubert *--t = '='; 2641edb306SCy Schubert } 2741edb306SCy Schubert } 28