Fixed some Code Analysis warnings.

This commit is contained in:
Michael Möller
2010-08-15 14:46:58 +00:00
parent 2ec18bf862
commit 2071610bbe
33 changed files with 609 additions and 535 deletions

View File

@@ -51,9 +51,8 @@ namespace OpenHardwareMonitor.Hardware.LPC {
foreach (string path in devicePaths) {
string name = null;
try {
StreamReader reader = new StreamReader(path + "/device/name");
name = reader.ReadLine();
reader.Close();
using (StreamReader reader = new StreamReader(path + "/device/name"))
name = reader.ReadLine();
} catch (IOException) { }
switch (name) {
case "f71858fg":