[BACK]Return to sort.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / sort

Diff for /src/usr.bin/sort/sort.c between version 1.81 and 1.82

version 1.81, 2015/10/13 16:55:03 version 1.82, 2015/10/14 16:42:51
Line 1132 
Line 1132 
                                 real_outfile = outfile;                                  real_outfile = outfile;
                                 sort_asprintf(&outfile, "%s.XXXXXXXXXX",                                  sort_asprintf(&outfile, "%s.XXXXXXXXXX",
                                     real_outfile);                                      real_outfile);
                                 if ((fd = mkstemp(outfile)) == -1 ||                                  if ((fd = mkstemp(outfile)) == -1)
                                     fchmod(fd, sb.st_mode & ACCESSPERMS) == -1)                                          err(2, "mkstemp: %s", outfile);
                                         err(2, "%s", outfile);                                  if (fchown(fd, sb.st_uid, sb.st_gid) == -1)
                                           warn("unable to set ownership of %s",
                                               outfile);
                                   if (fchmod(fd, sb.st_mode & ACCESSPERMS) == -1)
                                           err(2, "fchmod: %s", outfile);
                                 close(fd);                                  close(fd);
                                 tmp_file_atexit(outfile);                                  tmp_file_atexit(outfile);
                                 break;                                  break;

Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82