Clear file stream structure regardless of config options.
Structure clearing is needed as previous use of stream
list entry might leave fs_flags set.
Thia patch comes from nuttx community commit id:
b8b9309d
Change-Id: I072757f092cedc179982af736d6d9a48ee90c97b
Signed-off-by: EunBong Song <eunb.song@samsung.com>
if (stream->fs_fd < 0) {
/* Zero the structure */
-#if CONFIG_STDIO_BUFFER_SIZE > 0
memset(stream, 0, sizeof(FILE));
-#elif CONFIG_NUNGET_CHARS > 0
- stream->fs_nungotten = 0;
-#endif
#if CONFIG_STDIO_BUFFER_SIZE > 0
/* Initialize the semaphore the manages access to the buffer */