From 706c56d6b0677b969aea15c92ca7e6883c5d5b0a Mon Sep 17 00:00:00 2001
From: ballen4705 <ballen4705@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Tue, 29 Oct 2002 00:02:43 +0000
Subject: [PATCH] Tested wrong pointer for nullness

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@149 4ea69e1a-61f1-4043-bf83-b5c94c648137
---
 sm5/smartd.c   | 4 ++--
 sm5/smartd.cpp | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sm5/smartd.c b/sm5/smartd.c
index f3a86e062..dfdad3c63 100644
--- a/sm5/smartd.c
+++ b/sm5/smartd.c
@@ -43,7 +43,7 @@
 
 // CVS ID strings
 extern const char *CVSid1, *CVSid2;
-const char *CVSid6="$Id: smartd.c,v 1.37 2002/10/28 23:47:00 ballen4705 Exp $" 
+const char *CVSid6="$Id: smartd.c,v 1.38 2002/10/29 00:02:43 ballen4705 Exp $" 
 CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
 
 // global variable used for control of printing, passing arguments, etc.
@@ -415,7 +415,7 @@ int  ataCompareSmartValues2(struct ata_smart_values *new,
   int returnvalue;
 
   // check that attribute number in range, and no null pointers
-  if (n<0 || n>=NUMBER_ATA_SMART_ATTRIBUTES || !new || !old || !thre)
+  if (n<0 || n>=NUMBER_ATA_SMART_ATTRIBUTES || !new || !old || !thresholds)
     return 0;
   
   // pointers to disk's values and vendor's thresholds
diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp
index 6cb7d5156..6269b613f 100644
--- a/sm5/smartd.cpp
+++ b/sm5/smartd.cpp
@@ -43,7 +43,7 @@
 
 // CVS ID strings
 extern const char *CVSid1, *CVSid2;
-const char *CVSid6="$Id: smartd.cpp,v 1.37 2002/10/28 23:47:00 ballen4705 Exp $" 
+const char *CVSid6="$Id: smartd.cpp,v 1.38 2002/10/29 00:02:43 ballen4705 Exp $" 
 CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
 
 // global variable used for control of printing, passing arguments, etc.
@@ -415,7 +415,7 @@ int  ataCompareSmartValues2(struct ata_smart_values *new,
   int returnvalue;
 
   // check that attribute number in range, and no null pointers
-  if (n<0 || n>=NUMBER_ATA_SMART_ATTRIBUTES || !new || !old || !thre)
+  if (n<0 || n>=NUMBER_ATA_SMART_ATTRIBUTES || !new || !old || !thresholds)
     return 0;
   
   // pointers to disk's values and vendor's thresholds
-- 
GitLab