--- libaitcfg/src/aitcfg.c 2008/08/28 13:17:41 1.1 +++ libaitcfg/src/aitcfg.c 2009/09/09 09:07:31 1.2 @@ -1,3 +1,11 @@ +/************************************************************************* +* (C) 2008 AITNET ltd - Sofia/Bulgaria - +* by Michael Pounov +* +* $Author: misho $ +* $Id: aitcfg.c,v 1.2 2009/09/09 09:07:31 misho Exp $ +* +*************************************************************************/ #include "global.h" #include "aitcfg.h" @@ -20,7 +28,8 @@ inline int InitConfig(sl_config * __restrict cfg) if (!cfg) return -1; - return (int) (cfg->slh_first = NULL); + cfg->slh_first = NULL; + return 0; } /* @@ -67,7 +76,7 @@ void UnloadConfig(sl_config * __restrict cfg) if (!cfg->slh_first) return; - for (av = cfg->slh_first; av; av = av->sle_next) { + while ((av = cfg->slh_first)) { cfg->slh_first = cfg->slh_first->sle_next; if (av->psValue)