Minor change.
* libmailutils/stream/stream.c (mu_stream_set_stat): Allow for statbuf==NULL.
Showing
1 changed file
with
5 additions
and
2 deletions
... | @@ -1238,10 +1238,13 @@ mu_stream_set_stat (mu_stream_t stream, int statmask, | ... | @@ -1238,10 +1238,13 @@ 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; |
1243 | memset (stream->statbuf, 0, | 1245 | if (stream->statbuf) |
1244 | _MU_STREAM_STAT_MAX * sizeof (stream->statbuf[0])); | 1246 | memset (stream->statbuf, 0, |
1247 | _MU_STREAM_STAT_MAX * sizeof (stream->statbuf[0])); | ||
1245 | return 0; | 1248 | return 0; |
1246 | } | 1249 | } |
1247 | 1250 | ... | ... |
-
Please register or sign in to post a comment