diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-01-03 23:15:55 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-01-03 23:15:55 +0100 |
commit | 1b15896e8b29561447fff9a7bcaa028179eab51b (patch) | |
tree | 1741c4a57583eef5345ab036bcf8771fec569e24 /examples | |
parent | 055fbe1d87d99547a0503c5b15fe9617db295170 (diff) | |
download | libssh-1b15896e8b29561447fff9a7bcaa028179eab51b.tar.gz libssh-1b15896e8b29561447fff9a7bcaa028179eab51b.tar.xz libssh-1b15896e8b29561447fff9a7bcaa028179eab51b.zip |
Fix infinite loop in exec example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/exec.c b/examples/exec.c index eed75863..e2c2cd12 100644 --- a/examples/exec.c +++ b/examples/exec.c @@ -36,7 +36,7 @@ int main(void) { } - while ((rc = channel_read(channel, buffer, sizeof(buffer), 0)) >= 0) { + while ((rc = channel_read(channel, buffer, sizeof(buffer), 0)) > 0) { fwrite(buffer, 1, rc, stdout); } |