Commit b8c5000a b8c5000a532587e60eb857aa1a36e2723eb2d34f by Sergey Poznyakoff

Minor change.

* libmailutils/stream/stream.c (mu_stream_set_stat): Allow for statbuf==NULL.
1 parent 5416e044
...@@ -1238,8 +1238,11 @@ mu_stream_set_stat (mu_stream_t stream, int statmask, ...@@ -1238,8 +1238,11 @@ mu_stream_set_stat (mu_stream_t stream, int statmask,
1238 { 1238 {
1239 if (stream == NULL) 1239 if (stream == NULL)
1240 return EINVAL; 1240 return EINVAL;
1241 if (!statbuf)
1242 statmask = 0;
1241 stream->statmask = statmask; 1243 stream->statmask = statmask;
1242 stream->statbuf = statbuf; 1244 stream->statbuf = statbuf;
1245 if (stream->statbuf)
1243 memset (stream->statbuf, 0, 1246 memset (stream->statbuf, 0,
1244 _MU_STREAM_STAT_MAX * sizeof (stream->statbuf[0])); 1247 _MU_STREAM_STAT_MAX * sizeof (stream->statbuf[0]));
1245 return 0; 1248 return 0;
......