Initialize fd variable in constructor
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 29 Sep 2010 12:34:21 +0000 (14:34 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 29 Sep 2010 12:34:21 +0000 (14:34 +0200)
src/tmpfstream.hpp

index a15df9a..f73924a 100644 (file)
@@ -67,7 +67,7 @@ public:
     * @brief Constructs an unopened tmpfstreamTempl.
     */
     tmpfstreamTempl()
-        : unlinked(false), bio::stream<Device, Tr, Alloc>()
+        : unlinked(false), fd(-1), bio::stream<Device, Tr, Alloc>()
         { }
 
     /**
@@ -83,7 +83,7 @@ public:
     tmpfstreamTempl(const std::string& tmpnametemplate, 
                std::ios_base::open_mode mode = std::ios_base::out,
                int buffer_size = -1 , int pback_size = -1)
-        : unlinked(false), bio::stream<Device, Tr, Alloc>()
+        : unlinked(false), fd(-1), bio::stream<Device, Tr, Alloc>()
     {
         open(tmpnametemplate,mode,buffer_size,pback_size);
     }