#4268 libecl : Apply patch for handling of null pointer in util_access

This commit is contained in:
Magne Sjaastad 2019-04-02 11:20:43 +02:00
parent 38c2097e35
commit 738fc8e283

View File

@ -2153,10 +2153,7 @@ int util_fmove( FILE * stream , long offset , long shift) {
#ifdef HAVE_WINDOWS__ACCESS
bool util_access(const char * entry, int mode) {
if (!entry)
{
return false;
}
if (!entry) return false;
return (_access(entry, mode) == 0);
}
@ -2165,6 +2162,8 @@ bool util_access(const char * entry, int mode) {
#ifdef HAVE_POSIX_ACCESS
bool util_access(const char * entry, mode_t mode) {
if (!entry) return false;
return (access(entry, mode) == 0);
}
#endif