X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=knetfile.c;h=9e11dcc19ed71d42bab4ae47f480b81382602fc9;hb=32c42f6715535ee4d46332cf4ffc866062c6a754;hp=ac51a6bf39b4e702bbe24cc4afdb118bf5524911;hpb=d56f285da418ddbf9f3f33ab8ab247cfefc7b25c;p=samtools.git diff --git a/knetfile.c b/knetfile.c index ac51a6b..9e11dcc 100644 --- a/knetfile.c +++ b/knetfile.c @@ -503,7 +503,7 @@ off_t knet_seek(knetFile *fp, off_t off, int whence) return -1; } fp->offset = offset; - return fp->offset; + return 0; } else if (fp->type == KNF_TYPE_FTP) { @@ -514,12 +514,12 @@ off_t knet_seek(knetFile *fp, off_t off, int whence) else if ( whence==SEEK_END) fp->offset = fp->file_size+off; fp->is_ready = 0; - return fp->offset; + return 0; } else if (fp->type == KNF_TYPE_HTTP) { - if (whence == SEEK_END) { // FIXME: we can surely allow SEEK_CUR and SEEK_END in future - fprintf(stderr, "[knet_seek] SEEK_END is supported for HTTP. Offset is unchanged.\n"); + if (whence == SEEK_END) { // FIXME: can we allow SEEK_END in future? + fprintf(stderr, "[knet_seek] SEEK_END is not supported for HTTP. Offset is unchanged.\n"); return -1; } if (whence==SEEK_CUR)