~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysys/my_copy.c

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
 
95
95
    if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
96
96
        DBUG_RETURN(0);                 /* File copyed but not stat */
97
 
    VOID(chmod(to, stat_buff.st_mode & 07777)); /* Copy modes */
 
97
    (void) chmod(to, stat_buff.st_mode & 07777); /* Copy modes */
98
98
#if !defined(__WIN__) && !defined(__NETWARE__)
99
 
    VOID(chown(to, stat_buff.st_uid,stat_buff.st_gid)); /* Copy ownership */
 
99
    (void) chown(to, stat_buff.st_uid,stat_buff.st_gid); /* Copy ownership */
100
100
#endif
101
101
#if !defined(VMS) && !defined(__ZTC__)
102
102
    if (MyFlags & MY_COPYTIME)
104
104
      struct utimbuf timep;
105
105
      timep.actime  = stat_buff.st_atime;
106
106
      timep.modtime = stat_buff.st_mtime;
107
 
      VOID(utime((char*) to, &timep)); /* last accessed and modified times */
 
107
      (void) utime((char*) to, &timep); /* last accessed and modified times */
108
108
    }
109
109
#endif
110
110
    DBUG_RETURN(0);
111
111
  }
112
112
 
113
113
err:
114
 
  if (from_file >= 0) VOID(my_close(from_file,MyFlags));
 
114
  if (from_file >= 0) (void) my_close(from_file,MyFlags);
115
115
  if (to_file >= 0)
116
116
  {
117
 
    VOID(my_close(to_file, MyFlags));
 
117
    (void) my_close(to_file, MyFlags);
118
118
    /* attempt to delete the to-file we've partially written */
119
 
    VOID(my_delete(to, MyFlags));
 
119
    (void) my_delete(to, MyFlags);
120
120
  }
121
121
  DBUG_RETURN(-1);
122
122
} /* my_copy */