src/physfs.c
changeset 1344 3862cf505e99
parent 1341 a16e890cd34b
child 1347 93b2026e4964
equal deleted inserted replaced
1343:26cfac1a1f6f 1344:3862cf505e99
  2811 {
  2811 {
  2812     int retval = 0;
  2812     int retval = 0;
  2813     char *fname;
  2813     char *fname;
  2814     size_t len;
  2814     size_t len;
  2815 
  2815 
  2816     BAIL_IF_MACRO(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, -1);
  2816     BAIL_IF_MACRO(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0);
  2817     BAIL_IF_MACRO(!stat, PHYSFS_ERR_INVALID_ARGUMENT, -1);
  2817     BAIL_IF_MACRO(!stat, PHYSFS_ERR_INVALID_ARGUMENT, 0);
  2818     len = strlen(_fname) + 1;
  2818     len = strlen(_fname) + 1;
  2819     fname = (char *) __PHYSFS_smallAlloc(len);
  2819     fname = (char *) __PHYSFS_smallAlloc(len);
  2820     BAIL_IF_MACRO(!fname, PHYSFS_ERR_OUT_OF_MEMORY, -1);
  2820     BAIL_IF_MACRO(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0);
  2821 
  2821 
  2822     /* set some sane defaults... */
  2822     /* set some sane defaults... */
  2823     stat->filesize = -1;
  2823     stat->filesize = -1;
  2824     stat->modtime = -1;
  2824     stat->modtime = -1;
  2825     stat->createtime = -1;
  2825     stat->createtime = -1;