1*41edb306SCy Schubert /* 2*41edb306SCy Schubert * Copyright (C) 2012 by Darren Reed. 3*41edb306SCy Schubert * 4*41edb306SCy Schubert * See the IPFILTER.LICENCE file for details on licencing. 5*41edb306SCy Schubert * 6*41edb306SCy Schubert * $Id: assigndefined.c,v 1.4.2.2 2012/07/22 08:04:24 darren_r Exp $ 7*41edb306SCy Schubert */ 8*41edb306SCy Schubert 9*41edb306SCy Schubert #include "ipf.h" 10*41edb306SCy Schubert 11*41edb306SCy Schubert void assigndefined(env) 12*41edb306SCy Schubert char *env; 13*41edb306SCy Schubert { 14*41edb306SCy Schubert char *s, *t; 15*41edb306SCy Schubert 16*41edb306SCy Schubert if (env == NULL) 17*41edb306SCy Schubert return; 18*41edb306SCy Schubert 19*41edb306SCy Schubert for (s = strtok(env, ";"); s != NULL; s = strtok(NULL, ";")) { 20*41edb306SCy Schubert t = strchr(s, '='); 21*41edb306SCy Schubert if (t == NULL) 22*41edb306SCy Schubert continue; 23*41edb306SCy Schubert *t++ = '\0'; 24*41edb306SCy Schubert set_variable(s, t); 25*41edb306SCy Schubert *--t = '='; 26*41edb306SCy Schubert } 27*41edb306SCy Schubert } 28