diff options
| author | Paul Eggert | 2011-04-04 02:06:52 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-04 02:06:52 -0700 |
| commit | fe07cdfa53cf14415f9c7847d9e6af6747e5023c (patch) | |
| tree | 50b160817707181886e0ce2ec26f88e31a197074 /src | |
| parent | 82eaa3332cd0568b8e8f3f3dc3438dab61b7cc1d (diff) | |
| download | emacs-fe07cdfa53cf14415f9c7847d9e6af6747e5023c.tar.gz emacs-fe07cdfa53cf14415f9c7847d9e6af6747e5023c.zip | |
* process.c (read_process_output): Simplify nbytes computation if buffered.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 1 | ||||
| -rw-r--r-- | src/process.c | 9 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6c28e61a718..0716233d612 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | (create_pty): Remove unnecessary "volatile"s. | 5 | (create_pty): Remove unnecessary "volatile"s. |
| 6 | (Fnetwork_interface_info): Avoid possibility of int overflow. | 6 | (Fnetwork_interface_info): Avoid possibility of int overflow. |
| 7 | (read_process_output): Do adaptive read buffering even if carryover. | 7 | (read_process_output): Do adaptive read buffering even if carryover. |
| 8 | (read_process_output): Simplify nbytes computation if buffered. | ||
| 8 | 9 | ||
| 9 | * bytecode.c (exec_byte_code): Rename local to avoid shadowing. | 10 | * bytecode.c (exec_byte_code): Rename local to avoid shadowing. |
| 10 | 11 | ||
diff --git a/src/process.c b/src/process.c index 33f41c4a8f0..a9a8eb79ede 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5205,13 +5205,8 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5205 | } | 5205 | } |
| 5206 | } | 5206 | } |
| 5207 | #endif | 5207 | #endif |
| 5208 | if (buffered) | 5208 | nbytes += buffered; |
| 5209 | { | 5209 | nbytes += buffered && nbytes <= 0; |
| 5210 | if (nbytes < 0) | ||
| 5211 | nbytes = 1; | ||
| 5212 | else | ||
| 5213 | nbytes = nbytes + 1; | ||
| 5214 | } | ||
| 5215 | } | 5210 | } |
| 5216 | 5211 | ||
| 5217 | p->decoding_carryover = 0; | 5212 | p->decoding_carryover = 0; |