diff options
author | axtloss <axtlos@getcryst.al> | 2024-07-14 17:44:20 +0200 |
---|---|---|
committer | axtloss <axtlos@getcryst.al> | 2024-07-14 17:44:20 +0200 |
commit | 58fbbbca5a1f6b94885ce47e46c28e1cd03583d7 (patch) | |
tree | a9c53614295d8a6733f356679c0b633c5ce48e7c /src/extlib.c | |
parent | 1a4696492e3cd478080e438950a7664a68fefcd6 (diff) | |
download | extlib-58fbbbca5a1f6b94885ce47e46c28e1cd03583d7.tar.gz extlib-58fbbbca5a1f6b94885ce47e46c28e1cd03583d7.tar.bz2 |
move to autotools
Diffstat (limited to 'src/extlib.c')
-rw-r--r-- | src/extlib.c | 7 |
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; |