summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-11-10 06:44:54 +0000
committerRichard M. Stallman <rms@gnu.org>1995-11-10 06:44:54 +0000
commit87e00e8ca32e86566285a7d0ef3c96e6f6966a3b (patch)
treea8f264a8b04866e6b0d28ee14a959039b033d556 /src/fileio.c
parenta9e480a6f8b31033400c3371d0517a676470d901 (diff)
downloademacs-87e00e8ca32e86566285a7d0ef3c96e6f6966a3b.tar.gz
(Fwrite_region): Move the code that writes annotations for empty files.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c
index f6f99e5e305..47b987ad784 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3427,13 +3427,12 @@ to the file, instead of any buffer contents, and END is ignored.")
nwritten += XINT (end) - tem;
save_errno = errno;
}
-
- if (nwritten == 0)
- {
- /* If file was empty, still need to write the annotations */
- failure = 0 > a_write (desc, "", 0, XINT (start), &annotations);
- save_errno = errno;
- }
+ }
+ else
+ {
+ /* If file was empty, still need to write the annotations */
+ failure = 0 > a_write (desc, "", 0, XINT (start), &annotations);
+ save_errno = errno;
}
immediate_quit = 0;