mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
Merge pull request #122 from ficoos/remove_VLAs
(retrolaunch) Remove VLA
This commit is contained in:
commit
66ab67fa23
@ -105,8 +105,7 @@ static int get_sha1(const char *path, char *result)
|
|||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
int rv;
|
int rv;
|
||||||
int buff_len = 4096;
|
unsigned char buff[4096];
|
||||||
unsigned char buff[buff_len];
|
|
||||||
SHA1Context sha;
|
SHA1Context sha;
|
||||||
|
|
||||||
fd = open(path, O_RDONLY);
|
fd = open(path, O_RDONLY);
|
||||||
@ -117,7 +116,7 @@ static int get_sha1(const char *path, char *result)
|
|||||||
SHA1Reset(&sha);
|
SHA1Reset(&sha);
|
||||||
rv = 1;
|
rv = 1;
|
||||||
while (rv > 0) {
|
while (rv > 0) {
|
||||||
rv = read(fd, buff, buff_len);
|
rv = read(fd, buff, 4096);
|
||||||
if (rv < 0) {
|
if (rv < 0) {
|
||||||
close(fd);
|
close(fd);
|
||||||
return -errno;
|
return -errno;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user