Remove useless fstat call
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@405 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
3bc8c72c8b
commit
1cd506612d
|
@ -13,6 +13,7 @@ General
|
||||||
write_file()
|
write_file()
|
||||||
- Change open call flags, basically copy joe's way of doing it so
|
- Change open call flags, basically copy joe's way of doing it so
|
||||||
a more recent version will actually be included in (un)stable.
|
a more recent version will actually be included in (un)stable.
|
||||||
|
- Remove useless fstat call.
|
||||||
- nano.c:
|
- nano.c:
|
||||||
renumber()
|
renumber()
|
||||||
- Dont stupidly assign the value of prev->lineno if prev == NULL!
|
- Dont stupidly assign the value of prev->lineno if prev == NULL!
|
||||||
|
|
8
files.c
8
files.c
|
@ -354,14 +354,6 @@ int write_file(char *name, int tmp)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now we fstat() the file, to make sure it's the same file still!
|
|
||||||
Thanks to Oliver Friedrichs(?) for this code from securityfocus */
|
|
||||||
|
|
||||||
if (fstat(fd, &st2) != 0) {
|
|
||||||
close(fd);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/* Don't follow symlink. Create new file. */
|
/* Don't follow symlink. Create new file. */
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue