== string.Empty is .Lenght == 0

This commit is contained in:
UbitUmarov
2022-01-13 20:31:52 +00:00
parent 6595e3ae26
commit fbbcc1edd7
149 changed files with 261 additions and 264 deletions

View File

@@ -92,14 +92,14 @@ namespace OpenSim.Server.Base
else
{
string cert_path = networkConfig.GetString("cert_path", string.Empty);
if (cert_path == string.Empty)
if (cert_path.Length == 0)
{
System.Console.WriteLine("ERROR: Path to X509 certificate is missing, server can't start.");
Environment.Exit(1);
}
string cert_pass = networkConfig.GetString("cert_pass", string.Empty);
if (cert_pass == string.Empty)
if (cert_pass.Length == 0)
{
System.Console.WriteLine("ERROR: Password for X509 certificate is missing, server can't start.");
Environment.Exit(1);
@@ -120,13 +120,13 @@ namespace OpenSim.Server.Base
if (!ssl_external)
{
string cert_path = networkConfig.GetString("cert_path", string.Empty);
if ( cert_path == string.Empty )
if ( cert_path.Length == 0 )
{
System.Console.WriteLine("Path to X509 certificate is missing, server can't start.");
Thread.CurrentThread.Abort();
}
string cert_pass = networkConfig.GetString("cert_pass", string.Empty);
if ( cert_pass == string.Empty )
if ( cert_pass.Length == 0 )
{
System.Console.WriteLine("Password for X509 certificate is missing, server can't start.");
Thread.CurrentThread.Abort();