aboutsummaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/file.c b/file.c
index c20419a..ca22a6b 100644
--- a/file.c
+++ b/file.c
@@ -8,17 +8,17 @@ long
file_size(FILE * const file)
{
fpos_t p;
-
+
if ((fgetpos(file, &p) != 0)
|| (fseek(file, 0L, SEEK_END) != 0)) {
return -1;
}
-
+
const long size = ftell(file);
-
+
if (fsetpos(file, &p) != 0) {
return -1;
}
-
+
return size;
}