diff --git a/mongoose.c b/mongoose.c index 28fb22c0..c5343439 100644 --- a/mongoose.c +++ b/mongoose.c @@ -977,7 +977,8 @@ struct packed_file { #if MG_ENABLE_PACKED_FS #else const char *mg_unpack(const char *path, size_t *size, time_t *mtime) { - *size = 0, *mtime = 0; + if (size != NULL) *size = 0; + if (mtime != NULL) *mtime = 0; (void) path; return NULL; } diff --git a/src/fs_packed.c b/src/fs_packed.c index 0ef29e6e..1c4caf75 100644 --- a/src/fs_packed.c +++ b/src/fs_packed.c @@ -11,7 +11,8 @@ struct packed_file { #if MG_ENABLE_PACKED_FS #else const char *mg_unpack(const char *path, size_t *size, time_t *mtime) { - *size = 0, *mtime = 0; + if (size != NULL) *size = 0; + if (mtime != NULL) *mtime = 0; (void) path; return NULL; }