From 8c5dfc5921cde266cb77d8c40ec21d09213cac5e Mon Sep 17 00:00:00 2001 From: adamdebek Date: Wed, 6 Nov 2024 18:39:15 +0100 Subject: [PATCH] stdio/file: make rewind clear error indicator JIRA: RTOS-971 --- stdio/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdio/file.c b/stdio/file.c index 6b4dc349..1c785cc6 100644 --- a/stdio/file.c +++ b/stdio/file.c @@ -1115,7 +1115,8 @@ int getchar(void) void rewind(FILE *file) { - fseek(file, 0, SEEK_SET); + fseek(file, 0L, SEEK_SET); + file->flags &= ~F_ERROR; }