projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove call of _fwalk
[unix-history]
/
usr
/
src
/
usr.bin
/
mail
/
edit.c
diff --git
a/usr/src/usr.bin/mail/edit.c
b/usr/src/usr.bin/mail/edit.c
index
e91006c
..
36eae7e
100644
(file)
--- a/
usr/src/usr.bin/mail/edit.c
+++ b/
usr/src/usr.bin/mail/edit.c
@@
-6,7
+6,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)edit.c 5.1
4
(Berkeley) %G%";
+static char sccsid[] = "@(#)edit.c 5.1
5
(Berkeley) %G%";
#endif /* not lint */
#include "rcv.h"
#endif /* not lint */
#include "rcv.h"
@@
-96,7
+96,7
@@
edit1(msgvec, type)
}
if (ferror(otf))
perror("/tmp");
}
if (ferror(otf))
perror("/tmp");
- (void)
f
close(fp);
+ (void)
F
close(fp);
}
(void) signal(SIGINT, sigint);
}
}
(void) signal(SIGINT, sigint);
}
@@
-126,7
+126,7
@@
run_editor(fp, size, type, readonly)
perror(tempEdit);
goto out;
}
perror(tempEdit);
goto out;
}
- if ((nf =
f
dopen(t, "w")) == NULL) {
+ if ((nf =
F
dopen(t, "w")) == NULL) {
perror(tempEdit);
(void) unlink(tempEdit);
goto out;
perror(tempEdit);
(void) unlink(tempEdit);
goto out;
@@
-142,7
+142,14
@@
run_editor(fp, size, type, readonly)
modtime = 0;
else
modtime = statb.st_mtime;
modtime = 0;
else
modtime = statb.st_mtime;
- if (ferror(nf) || fclose(nf) < 0) {
+ if (ferror(nf)) {
+ (void) Fclose(nf);
+ perror(tempEdit);
+ (void) unlink(tempEdit);
+ nf = NULL;
+ goto out;
+ }
+ if (Fclose(nf) < 0) {
perror(tempEdit);
(void) unlink(tempEdit);
nf = NULL;
perror(tempEdit);
(void) unlink(tempEdit);
nf = NULL;
@@
-174,7
+181,7
@@
run_editor(fp, size, type, readonly)
/*
* Now switch to new file.
*/
/*
* Now switch to new file.
*/
- if ((nf =
f
open(tempEdit, "a+")) == NULL) {
+ if ((nf =
F
open(tempEdit, "a+")) == NULL) {
perror(tempEdit);
(void) unlink(tempEdit);
goto out;
perror(tempEdit);
(void) unlink(tempEdit);
goto out;