aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/inputStream_http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/inputStream_http.c b/src/inputStream_http.c
index 5eb06a086..979ead580 100644
--- a/src/inputStream_http.c
+++ b/src/inputStream_http.c
@@ -711,6 +711,8 @@ int inputStream_httpOpen(InputStream * inStream, char *url)
int inputStream_httpSeek(InputStream * inStream, long offset, int whence)
{
+ InputStreamHTTPData *data;
+
if (!inStream->seekable)
return -1;
@@ -728,7 +730,7 @@ int inputStream_httpSeek(InputStream * inStream, long offset, int whence)
return -1;
}
- InputStreamHTTPData *data = (InputStreamHTTPData *)inStream->data;
+ data = (InputStreamHTTPData *)inStream->data;
close(data->sock);
data->connState = HTTP_CONN_STATE_REOPEN;
data->buflen = 0;