summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-22 19:36:22 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-22 19:41:21 +0200
commit804df542960251e24be098e8ef52084e1faa3660 (patch)
treeccf2ffc8b173e54c4a58410a915cf2a4767b5ffa
parente36484662252fca23474e9227e3dee993ef3257a (diff)
downloadserenity-804df542960251e24be098e8ef52084e1faa3660.zip
LibC: Let's assert in rewind() that fseek()ing to the beginning worked
-rw-r--r--Libraries/LibC/stdio.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/LibC/stdio.cpp b/Libraries/LibC/stdio.cpp
index 531808f866..bce13c7f79 100644
--- a/Libraries/LibC/stdio.cpp
+++ b/Libraries/LibC/stdio.cpp
@@ -320,7 +320,9 @@ long ftell(FILE* stream)
void rewind(FILE* stream)
{
- fseek(stream, 0, SEEK_SET);
+ ASSERT(stream);
+ int rc = fseek(stream, 0, SEEK_SET);
+ ASSERT(rc == 0);
}
int dbgprintf(const char* fmt, ...)