mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-11-28 02:57:46 +01:00
commit bash-20180309 snapshot
This commit is contained in:
1 parent
2e66dc02d6
commit
bf5b8103d4
22 files changed
+350
-17
No files matched your search
+7
-2
@@ -839,8 +839,13 @@ _rl_read_file (char *filename, size_t *sizep)
|
||||
char *buffer;
|
||||
int i, file;
|
||||
|
||||
if ((stat (filename, &finfo) < 0) || (file = open (filename, O_RDONLY, 0666)) < 0)
|
||||
return ((char *)NULL);
|
||||
file = -1;
|
||||
if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0))
|
||||
{
|
||||
if (file >= 0)
|
||||
close (file);
|
||||
return ((char *)NULL);
|
||||
}
|
||||
|
||||
file_size = (size_t)finfo.st_size;
|
||||
|
||||
|
||||
Reference in new issue
Block a user