From 11c3e33fc1c7db48fdc6d5a6b7a7a890fc3ff602 Mon Sep 17 00:00:00 2001 From: Austin Noska Date: Wed, 30 Jun 2021 10:09:58 -0400 Subject: [PATCH] fix: Use if statement instead of while when checking if SQL read was successful in IcdTimeZoneInfo --- ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs b/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs index 6464a53..cbeb900 100644 --- a/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs +++ b/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs @@ -171,7 +171,7 @@ namespace ICD.Common.Utils.TimeZoneInfo { using (IcdSqliteDataReader reader = cmd.ExecuteReader()) { - while (reader.Read()) + if (reader.Read()) { bool isFixed = reader.GetBoolean(2); string timeOfDay = reader.GetString(3); @@ -208,7 +208,7 @@ namespace ICD.Common.Utils.TimeZoneInfo { using (IcdSqliteDataReader reader = cmd.ExecuteReader()) { - while (reader.Read()) + if (reader.Read()) { bool isFixed = reader.GetBoolean(2); string timeOfDay = reader.GetString(3);