changeset 17820:d7b187832881

(Finsert_file_contents): Use xmalloc. not malloc. Check correctly for whether no code translation is needed.
author Richard M. Stallman <rms@gnu.org>
date Thu, 15 May 1997 20:15:56 +0000
parents 6fd66459ec9a
children c0422adc1b0e
files src/fileio.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Thu May 15 18:39:33 1997 +0000
+++ b/src/fileio.c	Thu May 15 20:15:56 1997 +0000
@@ -3166,9 +3166,9 @@
   if (!NILP (replace)
       && (! CODING_REQUIRE_CONVERSION (&coding)
 	  || (coding.type == coding_type_automatic
-	      && ! CODING_REQUIRE_TEXT_CONVERSION (&coding))
+	      && ! CODING_REQUIRE_EOL_CONVERSION (&coding))
 	  || (coding.eol_type == CODING_EOL_AUTOMATIC
-	      && ! CODING_REQUIRE_EOL_CONVERSION (&coding))))
+	      && ! CODING_REQUIRE_TEXT_CONVERSION (&coding))))
     {
       int same_at_start = BEGV;
       int same_at_end = ZV;
@@ -3336,7 +3336,7 @@
       int bufpos;
       /* Make sure that the gap is large enough.  */
       int bufsize = 2 * st.st_size;
-      unsigned char *conversion_buffer = (unsigned char *) malloc (bufsize);
+      unsigned char *conversion_buffer = (unsigned char *) xmalloc (bufsize);
 
       /* First read the whole file, performing code conversion into
 	 CONVERSION_BUFFER.  */