platform/posix.c
changeset 292 99bf6ef5639a
parent 259 bd65a0d74e9a
child 310 f8bca4a93fd5
equal deleted inserted replaced
291:6acae2db8dea 292:99bf6ef5639a
   360     int fd;
   360     int fd;
   361     int *retval;
   361     int *retval;
   362     errno = 0;
   362     errno = 0;
   363 
   363 
   364     fd = open(filename, mode, S_IRUSR | S_IWUSR);
   364     fd = open(filename, mode, S_IRUSR | S_IWUSR);
   365     if (fd < 0)
   365     BAIL_IF_MACRO(fd < 0, strerror(errno), NULL);
   366         __PHYSFS_setError(strerror(errno));
       
   367 
   366 
   368     retval = (int *) malloc(sizeof (int));
   367     retval = (int *) malloc(sizeof (int));
   369     if (retval == NULL)
   368     if (retval == NULL)
   370     {
   369     {
   371         close(fd);
   370         close(fd);