mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-30 09:00:31 -08:00
(Finsert_file_contents): Use xmalloc. not malloc.
Check correctly for whether no code translation is needed.
This commit is contained in:
parent
69b3a14b48
commit
b00ca0d7ea
1 changed files with 3 additions and 3 deletions
|
|
@ -3166,9 +3166,9 @@ This does code conversion according to the value of\n\
|
|||
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 @@ This does code conversion according to the value of\n\
|
|||
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. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue