summaryrefslogtreecommitdiff
path: root/libmailutils
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-12-11 11:44:34 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-12-11 11:44:34 +0200
commitb8c5000a532587e60eb857aa1a36e2723eb2d34f (patch)
tree38aeebf364625d4c71352d8e74c5e45f96ab1915 /libmailutils
parent5416e044b0995e3f49676152da15866fcf29d323 (diff)
downloadmailutils-b8c5000a532587e60eb857aa1a36e2723eb2d34f.tar.gz
mailutils-b8c5000a532587e60eb857aa1a36e2723eb2d34f.tar.bz2
Minor change.
* libmailutils/stream/stream.c (mu_stream_set_stat): Allow for statbuf==NULL.
Diffstat (limited to 'libmailutils')
-rw-r--r--libmailutils/stream/stream.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libmailutils/stream/stream.c b/libmailutils/stream/stream.c
index 45efe3b4e..7b6a3c72f 100644
--- a/libmailutils/stream/stream.c
+++ b/libmailutils/stream/stream.c
@@ -1238,10 +1238,13 @@ mu_stream_set_stat (mu_stream_t stream, int statmask,
{
if (stream == NULL)
return EINVAL;
+ if (!statbuf)
+ statmask = 0;
stream->statmask = statmask;
stream->statbuf = statbuf;
- memset (stream->statbuf, 0,
- _MU_STREAM_STAT_MAX * sizeof (stream->statbuf[0]));
+ if (stream->statbuf)
+ memset (stream->statbuf, 0,
+ _MU_STREAM_STAT_MAX * sizeof (stream->statbuf[0]));
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.