Commit df1749ce authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use bool

parent 9a7a7f6e
...@@ -207,7 +207,7 @@ int Config::Parse() ...@@ -207,7 +207,7 @@ int Config::Parse()
FILE *fd; FILE *fd;
char line[1024]; //TODO line length should not be limited char line[1024]; //TODO line length should not be limited
char tline[1024]; char tline[1024];
unsigned int something=0; bool something = false;
Program *pp= new Program(); Program *pp= new Program();
iconv_t to_unicode, check_unicode; iconv_t to_unicode, check_unicode;
...@@ -263,7 +263,7 @@ int Config::Parse() ...@@ -263,7 +263,7 @@ int Config::Parse()
} }
Programs.push_back(pp); Programs.push_back(pp);
pp=new Program(); pp=new Program();
something=0; something=false;
} }
} }
...@@ -274,7 +274,7 @@ int Config::Parse() ...@@ -274,7 +274,7 @@ int Config::Parse()
size_t tlen, ulen; size_t tlen, ulen;
strgeta(line,tline,'='); strgeta(line,tline,'=');
something=1; something=true;
tptr=tline; tptr=tline;
uptr=uline; uptr=uline;
...@@ -300,7 +300,7 @@ int Config::Parse() ...@@ -300,7 +300,7 @@ int Config::Parse()
if(strstr(line,"program_ttl=")) if(strstr(line,"program_ttl="))
{ {
strgeta(line,tline,'='); strgeta(line,tline,'=');
something=1; something=true;
pp->SetTTL(tline); pp->SetTTL(tline);
} }
...@@ -311,7 +311,7 @@ int Config::Parse() ...@@ -311,7 +311,7 @@ int Config::Parse()
size_t tlen, ulen; size_t tlen, ulen;
strgeta(line,tline,'='); strgeta(line,tline,'=');
something=1; something=true;
tptr=tline; tptr=tline;
uptr=uline; uptr=uline;
...@@ -343,40 +343,40 @@ int Config::Parse() ...@@ -343,40 +343,40 @@ int Config::Parse()
if(strstr(line,"user=")) if(strstr(line,"user="))
{ {
strgeta(line,tline,'='); strgeta(line,tline,'=');
something=1; something=true;
pp->SetUser(tline); pp->SetUser(tline);
} }
if(strstr(line,"machine=")) if(strstr(line,"machine="))
{ {
strgeta(line,tline,'='); strgeta(line,tline,'=');
something=1; something=true;
pp->SetMachine(tline); pp->SetMachine(tline);
} }
if(strstr(line,"site=")) if(strstr(line,"site="))
{ {
strgeta(line,tline,'='); strgeta(line,tline,'=');
something=1; something=true;
pp->SetSite(tline); pp->SetSite(tline);
} }
if(strstr(line,"address=")) if(strstr(line,"address="))
{ {
strgeta(line,tline,'='); strgeta(line,tline,'=');
something=1; something=true;
pp->SetAddress(tline); pp->SetAddress(tline);
} }
if(strstr(line,"port=")) if(strstr(line,"port="))
{ {
strgeta(line,tline,'='); strgeta(line,tline,'=');
something=1; something=true;
pp->SetPort(atoi(tline)); pp->SetPort(atoi(tline));
} }
if(strstr(line,"customsdp=")) if(strstr(line,"customsdp="))
{ {
strgeta(line,tline,'='); strgeta(line,tline,'=');
something=1; something=true;
pp->SetCustomSDP(tline); pp->SetCustomSDP(tline);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment