mirror of https://git.48k.eu/ogserver
#580 simplify check for empty string
parent
2427e9d8fe
commit
aff4cfdd5f
|
@ -71,31 +71,31 @@ bool tomaConfiguracion(char* filecfg) {
|
||||||
line = fgets(buf, sizeof(buf), fcfg);
|
line = fgets(buf, sizeof(buf), fcfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (servidoradm[0] == (char) NULL) {
|
if (!servidoradm[0]) {
|
||||||
og_log(4, FALSE); // Falta parámetro SERVIDORADM
|
og_log(4, FALSE); // Falta parámetro SERVIDORADM
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (puerto[0] == (char) NULL) {
|
if (!puerto[0]) {
|
||||||
og_log(5, FALSE); // Falta parámetro PUERTO
|
og_log(5, FALSE); // Falta parámetro PUERTO
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (usuario[0] == (char) NULL) {
|
if (!usuario[0]) {
|
||||||
og_log(6, FALSE); // Falta parámetro USUARIO
|
og_log(6, FALSE); // Falta parámetro USUARIO
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (pasguor[0] == (char) NULL) {
|
if (!pasguor[0]) {
|
||||||
og_log(7, FALSE); // Falta parámetro PASSWORD
|
og_log(7, FALSE); // Falta parámetro PASSWORD
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (datasource[0] == (char) NULL) {
|
if (!datasource[0]) {
|
||||||
og_log(8, FALSE); // Falta parámetro DATASOURCE
|
og_log(8, FALSE); // Falta parámetro DATASOURCE
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (catalog[0] == (char) NULL) {
|
if (!catalog[0]) {
|
||||||
og_log(9, FALSE); // Falta parámetro CATALOG
|
og_log(9, FALSE); // Falta parámetro CATALOG
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (aulaup[0] == (char) NULL)
|
if (!aulaup[0])
|
||||||
strcpy(aulaup, "0"); // Por defecto el conmutador de registro automático esta en off
|
strcpy(aulaup, "0"); // Por defecto el conmutador de registro automático esta en off
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
|
Loading…
Reference in New Issue