diff options
| author | David Kastrup | 2003-03-09 22:48:08 +0000 |
|---|---|---|
| committer | David Kastrup | 2003-03-09 22:48:08 +0000 |
| commit | 9e25126f0b57eb7f90e51b5b68d788547c79c7d9 (patch) | |
| tree | c3909cd06aabbe9fe78e7156b8ed2e0da30578b9 /src/process.c | |
| parent | 1d1de69596764edf0298eabe78187253fe86aa09 (diff) | |
| download | emacs-9e25126f0b57eb7f90e51b5b68d788547c79c7d9.tar.gz emacs-9e25126f0b57eb7f90e51b5b68d788547c79c7d9.zip | |
(read_process_output): We have allocated enough space
for readmax and carryover, so actually use the alloted space.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index 9790b7d29a6..6dc052e716b 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4463,18 +4463,18 @@ read_process_output (proc, channel) | |||
| 4463 | if (DATAGRAM_CHAN_P (channel)) | 4463 | if (DATAGRAM_CHAN_P (channel)) |
| 4464 | { | 4464 | { |
| 4465 | int len = datagram_address[channel].len; | 4465 | int len = datagram_address[channel].len; |
| 4466 | nbytes = recvfrom (channel, chars + carryover, readmax - carryover, | 4466 | nbytes = recvfrom (channel, chars + carryover, readmax, |
| 4467 | 0, datagram_address[channel].sa, &len); | 4467 | 0, datagram_address[channel].sa, &len); |
| 4468 | } | 4468 | } |
| 4469 | else | 4469 | else |
| 4470 | #endif | 4470 | #endif |
| 4471 | if (proc_buffered_char[channel] < 0) | 4471 | if (proc_buffered_char[channel] < 0) |
| 4472 | nbytes = emacs_read (channel, chars + carryover, readmax - carryover); | 4472 | nbytes = emacs_read (channel, chars + carryover, readmax); |
| 4473 | else | 4473 | else |
| 4474 | { | 4474 | { |
| 4475 | chars[carryover] = proc_buffered_char[channel]; | 4475 | chars[carryover] = proc_buffered_char[channel]; |
| 4476 | proc_buffered_char[channel] = -1; | 4476 | proc_buffered_char[channel] = -1; |
| 4477 | nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1 - carryover); | 4477 | nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1); |
| 4478 | if (nbytes < 0) | 4478 | if (nbytes < 0) |
| 4479 | nbytes = 1; | 4479 | nbytes = 1; |
| 4480 | else | 4480 | else |