Browse Source

[3186] Fixed a couple of minor errors found on Fedora

Needed an include of stdint.h and to initialize the UserDataSource::open_flag_
in its constructor.
Thomas Markwalder 11 years ago
parent
commit
6291862d54

+ 2 - 1
src/hooks/dhcp/user_chk/user.h

@@ -17,8 +17,9 @@
 
 #include <boost/shared_ptr.hpp>
 
-#include <vector>
 #include <map>
+#include <stdint.h>
+#include <vector>
 
 class UserId {
 public:

+ 1 - 4
src/hooks/dhcp/user_chk/user_data_source.cc

@@ -14,13 +14,10 @@
 
 #include <user_data_source.h>
 
-UserDataSource::UserDataSource() {
+UserDataSource::UserDataSource() : open_flag_(false) {
 }
 
 UserDataSource::~UserDataSource() {
-    if (open_flag_) {
-        close();
-    }
 }
 
 void

+ 1 - 0
src/hooks/dhcp/user_chk/user_file.cc

@@ -25,6 +25,7 @@ UserFile::UserFile(const std::string& fname) : fname_(fname) {
 }
 
 UserFile::~UserFile(){
+    close();
 };
 
 void