summaryrefslogtreecommitdiffstats
path: root/src/dom/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/dom/io')
-rw-r--r--src/dom/io/domstream.h11
-rw-r--r--src/dom/io/gzipstream.cpp2
2 files changed, 10 insertions, 3 deletions
diff --git a/src/dom/io/domstream.h b/src/dom/io/domstream.h
index b2e308653..1a93e73b2 100644
--- a/src/dom/io/domstream.h
+++ b/src/dom/io/domstream.h
@@ -51,7 +51,8 @@ class StreamException
public:
StreamException(const DOMString &theReason) throw()
- { reason = theReason; }
+ : reason(theReason)
+ {}
virtual ~StreamException() throw()
{ }
char const *what()
@@ -576,7 +577,13 @@ protected:
Writer *destination;
BasicWriter()
- { destination = NULL; }
+ {
+ destination = NULL;
+ for(int k=0;k<2048;++k)
+ {
+ formatBuf[k]=0;
+ }
+ }
//Used for printf() or other things that might
//require formatting before sending down the stream
diff --git a/src/dom/io/gzipstream.cpp b/src/dom/io/gzipstream.cpp
index e1f9f9a60..2a2f8a5b5 100644
--- a/src/dom/io/gzipstream.cpp
+++ b/src/dom/io/gzipstream.cpp
@@ -188,7 +188,7 @@ void GzipOutputStream::close()
*/
void GzipOutputStream::flush()
{
- if (closed || buffer.size()<1)
+ if (closed || buffer.empty())
return;
std::vector<unsigned char> compBuf;