summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-03-17 02:56:16 +0000
committerJeffrey Stedfast <fejj@src.gnome.org>2002-03-17 02:56:16 +0000
commitfbe86b9036a802a31248c1e557e79cdb81619c61 (patch)
tree2d7d058f30531fb3a8c8cf37801434d1a0041218
parentfc9b44608669a083c52ebf1ce954390c3375afc6 (diff)
downloadgmime-fbe86b9036a802a31248c1e557e79cdb81619c61.tar.gz
Check fd against -1.
2002-03-16 Jeffrey Stedfast <fejj@ximian.com> * gmime-stream-fs.c (stream_destroy): Check fd against -1. * gmime-stream-mmap.c (stream_destroy): Check that fd != -1.
-rw-r--r--ChangeLog6
-rw-r--r--gmime-stream-fs.c2
-rw-r--r--gmime-stream-mmap.c2
-rw-r--r--gmime/gmime-stream-fs.c2
-rw-r--r--gmime/gmime-stream-mmap.c2
5 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5389cb62..f86d866d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-16 Jeffrey Stedfast <fejj@ximian.com>
+
+ * gmime-stream-fs.c (stream_destroy): Check fd against -1.
+
+ * gmime-stream-mmap.c (stream_destroy): Check that fd != -1.
+
2002-03-15 Charles Kerr <charles@rebelbase.com>
* gmime-filter-charset.c: fixed minor compiler warnings.
diff --git a/gmime-stream-fs.c b/gmime-stream-fs.c
index a20d0eba..0fa473f4 100644
--- a/gmime-stream-fs.c
+++ b/gmime-stream-fs.c
@@ -61,7 +61,7 @@ stream_destroy (GMimeStream *stream)
{
GMimeStreamFs *fstream = (GMimeStreamFs *) stream;
- if (fstream->owner && fstream->fd)
+ if (fstream->owner && fstream->fd != -1)
close (fstream->fd);
g_free (fstream);
diff --git a/gmime-stream-mmap.c b/gmime-stream-mmap.c
index 951159ec..b2e6eb6d 100644
--- a/gmime-stream-mmap.c
+++ b/gmime-stream-mmap.c
@@ -72,7 +72,7 @@ stream_destroy (GMimeStream *stream)
munmap (mstream->map, mstream->maplen);
#endif
- if (mstream->fd)
+ if (mstream->fd != -1)
close (mstream->fd);
}
diff --git a/gmime/gmime-stream-fs.c b/gmime/gmime-stream-fs.c
index a20d0eba..0fa473f4 100644
--- a/gmime/gmime-stream-fs.c
+++ b/gmime/gmime-stream-fs.c
@@ -61,7 +61,7 @@ stream_destroy (GMimeStream *stream)
{
GMimeStreamFs *fstream = (GMimeStreamFs *) stream;
- if (fstream->owner && fstream->fd)
+ if (fstream->owner && fstream->fd != -1)
close (fstream->fd);
g_free (fstream);
diff --git a/gmime/gmime-stream-mmap.c b/gmime/gmime-stream-mmap.c
index 951159ec..b2e6eb6d 100644
--- a/gmime/gmime-stream-mmap.c
+++ b/gmime/gmime-stream-mmap.c
@@ -72,7 +72,7 @@ stream_destroy (GMimeStream *stream)
munmap (mstream->map, mstream->maplen);
#endif
- if (mstream->fd)
+ if (mstream->fd != -1)
close (mstream->fd);
}