projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82eaa33
)
* process.c (read_process_output): Simplify nbytes computation if buffered.
author
Paul Eggert
<eggert@cs.ucla.edu>
Mon, 4 Apr 2011 09:06:52 +0000
(
02:06
-0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Mon, 4 Apr 2011 09:06:52 +0000
(
02:06
-0700)
src/ChangeLog
patch
|
blob
|
history
src/process.c
patch
|
blob
|
history
diff --git
a/src/ChangeLog
b/src/ChangeLog
index 6c28e61a7184c431963031b8a103c644ed5dc9b3..0716233d6129e058ef2f0e109dc7d69f6f4c2754 100644
(file)
--- a/
src/ChangeLog
+++ b/
src/ChangeLog
@@
-5,6
+5,7
@@
(create_pty): Remove unnecessary "volatile"s.
(Fnetwork_interface_info): Avoid possibility of int overflow.
(read_process_output): Do adaptive read buffering even if carryover.
+ (read_process_output): Simplify nbytes computation if buffered.
* bytecode.c (exec_byte_code): Rename local to avoid shadowing.
diff --git
a/src/process.c
b/src/process.c
index 33f41c4a8f0bda50e87b8ce30de88ec36cec0104..a9a8eb79edecdf28566aa6376ef1b4c7b3d5d8ae 100644
(file)
--- a/
src/process.c
+++ b/
src/process.c
@@
-5205,13
+5205,8
@@
read_process_output (Lisp_Object proc, register int channel)
}
}
#endif
- if (buffered)
- {
- if (nbytes < 0)
- nbytes = 1;
- else
- nbytes = nbytes + 1;
- }
+ nbytes += buffered;
+ nbytes += buffered && nbytes <= 0;
}
p->decoding_carryover = 0;