Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
a21b4ed1
Commit
a21b4ed1
authored
Dec 13, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
https: fix uintmax/uint64 mix-up
parent
99ce7125
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
modules/access/http/file.h
modules/access/http/file.h
+1
-1
modules/access/http/file_test.c
modules/access/http/file_test.c
+4
-4
No files found.
modules/access/http/file.h
View file @
a21b4ed1
...
...
@@ -35,5 +35,5 @@ char *vlc_http_file_get_redirect(struct vlc_http_file *file);
uintmax_t
vlc_http_file_get_size
(
struct
vlc_http_file
*
file
);
bool
vlc_http_file_can_seek
(
struct
vlc_http_file
*
file
);
char
*
vlc_http_file_get_type
(
struct
vlc_http_file
*
file
);
int
vlc_http_file_seek
(
struct
vlc_http_file
*
file
,
uint
64
_t
offset
);
int
vlc_http_file_seek
(
struct
vlc_http_file
*
file
,
uint
max
_t
offset
);
struct
block_t
*
vlc_http_file_read
(
struct
vlc_http_file
*
file
);
modules/access/http/file_test.c
View file @
a21b4ed1
...
...
@@ -37,7 +37,7 @@ static const char url[] = "https://www.example.com:8443/dir/file.ext?a=b";
static
const
char
ua
[]
=
PACKAGE_NAME
"/"
PACKAGE_VERSION
" (test suite)"
;
static
const
char
*
replies
[
2
]
=
{
NULL
,
NULL
};
static
uint
64
_t
offset
=
0
;
static
uint
max
_t
offset
=
0
;
int
main
(
void
)
{
...
...
@@ -50,7 +50,7 @@ int main(void)
vlc_http_file_seek
(
f
,
0
);
assert
(
vlc_http_file_get_status
(
f
)
<
0
);
assert
(
vlc_http_file_get_redirect
(
f
)
==
NULL
);
assert
(
vlc_http_file_get_size
(
f
)
==
UINT64_MAX
);
assert
(
vlc_http_file_get_size
(
f
)
==
(
uintmax_t
)
-
1
);
assert
(
!
vlc_http_file_can_seek
(
f
));
assert
(
vlc_http_file_get_type
(
f
)
==
NULL
);
assert
(
vlc_http_file_read
(
f
)
==
NULL
);
...
...
@@ -67,7 +67,7 @@ int main(void)
assert
(
f
!=
NULL
);
assert
(
vlc_http_file_get_status
(
f
)
==
200
);
assert
(
!
vlc_http_file_can_seek
(
f
));
assert
(
vlc_http_file_get_size
(
f
)
==
UINT64_MAX
);
assert
(
vlc_http_file_get_size
(
f
)
==
(
uintmax_t
)
-
1
);
str
=
vlc_http_file_get_type
(
f
);
assert
(
str
!=
NULL
&&
!
strcmp
(
str
,
"video/mpeg"
));
free
(
str
);
...
...
@@ -119,7 +119,7 @@ int main(void)
f
=
vlc_http_file_create
(
NULL
,
url
,
ua
,
NULL
);
assert
(
f
!=
NULL
);
assert
(
!
vlc_http_file_can_seek
(
f
));
assert
(
vlc_http_file_get_size
(
f
)
==
UINT64_MAX
);
assert
(
vlc_http_file_get_size
(
f
)
==
(
uintmax_t
)
-
1
);
str
=
vlc_http_file_get_redirect
(
f
);
assert
(
str
!=
NULL
&&
!
strcmp
(
str
,
"https://www.example.com:8443/somewhere/else/"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment