Mercurial > emacs
comparison src/callproc.c @ 18489:42257ed9c7e3
(Fcall_process): Avoid storing alloca result
directly into array element.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 28 Jun 1997 23:45:26 +0000 |
parents | 43ce16d5f31e |
children | c64480c04c07 |
comparison
equal
deleted
inserted
replaced
18488:3a7fb597e8a8 | 18489:42257ed9c7e3 |
---|---|
389 { | 389 { |
390 /* We must encode the arguments. */ | 390 /* We must encode the arguments. */ |
391 int size = encoding_buffer_size (&argument_coding, | 391 int size = encoding_buffer_size (&argument_coding, |
392 XSTRING (args[i])->size); | 392 XSTRING (args[i])->size); |
393 int produced, dummy; | 393 int produced, dummy; |
394 | 394 unsigned char *dummy = (unsigned char *) alloca (size); |
395 new_argv[i - 3] = (unsigned char *) alloca (size); | 395 |
396 /* The Irix 4.0 compiler barfs if we eliminate dummy. */ | |
397 new_argv[i - 3] = dummy; | |
396 produced = encode_coding (&argument_coding, | 398 produced = encode_coding (&argument_coding, |
397 XSTRING (args[i])->data, new_argv[i - 3], | 399 XSTRING (args[i])->data, new_argv[i - 3], |
398 XSTRING (args[i])->size, size, &dummy); | 400 XSTRING (args[i])->size, size, &dummy); |
399 new_argv[i - 3][produced] = 0; | 401 new_argv[i - 3][produced] = 0; |
400 } | 402 } |