aboutsummaryrefslogtreecommitdiff
path: root/src/extlib.c
diff options
context:
space:
mode:
authoraxtloss <axtlos@getcryst.al>2024-07-14 17:44:20 +0200
committeraxtloss <axtlos@getcryst.al>2024-07-14 17:44:20 +0200
commit58fbbbca5a1f6b94885ce47e46c28e1cd03583d7 (patch)
treea9c53614295d8a6733f356679c0b633c5ce48e7c /src/extlib.c
parent1a4696492e3cd478080e438950a7664a68fefcd6 (diff)
downloadextlib-58fbbbca5a1f6b94885ce47e46c28e1cd03583d7.tar.gz
extlib-58fbbbca5a1f6b94885ce47e46c28e1cd03583d7.tar.bz2
move to autotools
Diffstat (limited to '')
-rw-r--r--src/extlib.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/extlib.c b/src/extlib.c
index ce11709..4ee5744 100644
--- a/src/extlib.c
+++ b/src/extlib.c
@@ -27,7 +27,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <time.h>
#undef free
#undef malloc
@@ -67,13 +66,13 @@ fcopy (FILE *src, FILE *dst)
if (src == NULL || dst == NULL)
return -1;
- while ((n = fread (buffer, sizeof (char), sizeof (buffer), f1)) > 0)
+ while ((n = fread (buffer, sizeof (char), sizeof (buffer), src)) > 0)
{
- if (fwrite (buffer, sizeof (char), n, f2) != n) {
+ if (fwrite (buffer, sizeof (char), n, dst) != n) {
fprintf (stderr, "Failed to copy data");
return -1;
}
- fflush (f2);
+ fflush (dst);
copied += n;
}
return copied;