Code cleanup
This commit is contained in:
parent
81b0cfa01b
commit
2afc2d3249
|
@ -134,7 +134,7 @@ static int _config_hosts(DaMon * damon, Config * config, char * hosts)
|
||||||
unsigned int pos = 0;
|
unsigned int pos = 0;
|
||||||
Host * p;
|
Host * p;
|
||||||
|
|
||||||
for(; h[0] != '\0';)
|
while(h[0] != '\0')
|
||||||
{
|
{
|
||||||
if(h[pos] != '\0' && h[pos] != ',')
|
if(h[pos] != '\0' && h[pos] != ',')
|
||||||
{
|
{
|
||||||
|
@ -147,7 +147,7 @@ static int _config_hosts(DaMon * damon, Config * config, char * hosts)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if((p = realloc(damon->hosts, sizeof(Host)
|
if((p = realloc(damon->hosts, sizeof(Host)
|
||||||
* (damon->hosts_cnt+1)))
|
* (damon->hosts_cnt + 1)))
|
||||||
== NULL)
|
== NULL)
|
||||||
return _damon_error("malloc", 1);
|
return _damon_error("malloc", 1);
|
||||||
damon->hosts = p;
|
damon->hosts = p;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user