summaryrefslogtreecommitdiff
path: root/plugins/vfs_curl
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-03-26 17:53:53 +0100
committerGravatar waker <wakeroid@gmail.com>2011-03-26 17:53:53 +0100
commit6a80471a8396633460c2f91bc71c9f005171aee8 (patch)
treeef09bcaf9d1bad47af9a33998e10d2f6378f7382 /plugins/vfs_curl
parent95f1a30a22d4e39a2084ed0680464bd1d3a99cbf (diff)
fixed vfs_curl gc bug
Diffstat (limited to 'plugins/vfs_curl')
-rw-r--r--plugins/vfs_curl/vfs_curl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/vfs_curl/vfs_curl.c b/plugins/vfs_curl/vfs_curl.c
index 74bb0491..46bc231a 100644
--- a/plugins/vfs_curl/vfs_curl.c
+++ b/plugins/vfs_curl/vfs_curl.c
@@ -953,7 +953,7 @@ http_cancel_abort (DB_FILE *fp) {
for (int i = 0; i < num_abort_files; i++) {
if (abort_files[i] == fp) {
if (i != num_abort_files-1) {
- memmove (abort_files+i, abort_files+i+1, sizeof (DB_FILE *) * (num_abort_files-i-1));
+ abort_files[i] = abort_files[num_abort_files-1];
}
num_abort_files--;
break;
@@ -987,7 +987,7 @@ http_unreg_open_file (DB_FILE *fp) {
for (i = 0; i < num_open_files; i++) {
if (open_files[i] == fp) {
if (i != num_open_files-1) {
- memmove (open_files+i, open_files+i+1, sizeof (DB_FILE *) * (num_open_files-i-1));
+ open_files[i] = open_files[num_open_files-1];
}
num_open_files--;
trace ("remove from open list: %p\n", fp);
@@ -997,7 +997,7 @@ http_unreg_open_file (DB_FILE *fp) {
// gc abort_files
int j = 0;
- while (j < num_open_files) {
+ while (j < num_abort_files) {
for (i = 0; i < num_open_files; i++) {
if (abort_files[j] == open_files[i]) {
break;