diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-22 19:36:22 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-22 19:41:21 +0200 |
commit | 804df542960251e24be098e8ef52084e1faa3660 (patch) | |
tree | ccf2ffc8b173e54c4a58410a915cf2a4767b5ffa /Libraries/LibC/stdio.cpp | |
parent | e36484662252fca23474e9227e3dee993ef3257a (diff) | |
download | serenity-804df542960251e24be098e8ef52084e1faa3660.zip |
LibC: Let's assert in rewind() that fseek()ing to the beginning worked
Diffstat (limited to 'Libraries/LibC/stdio.cpp')
-rw-r--r-- | Libraries/LibC/stdio.cpp | 4 |
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, ...) |