diff options
| author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2015-12-06 09:27:17 +0300 |
|---|---|---|
| committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2015-12-06 09:27:17 +0300 |
| commit | a95d8a27b446c614e982c989d4a096c8640d2aeb (patch) | |
| tree | c3b0bd253bc7d301f417cb5ce618861ba1c91ed9 /libguile-ssh | |
| parent | channel.scm (make-channel): Use mode symbols from (ice-9 popen) (diff) | |
| download | guile-ssh-a95d8a27b446c614e982c989d4a096c8640d2aeb.tar.gz | |
libguile-ssh/channel-type.c: Bugfix: Fix assertion
Diffstat (limited to 'libguile-ssh')
| -rw-r--r-- | libguile-ssh/channel-type.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile-ssh/channel-type.c b/libguile-ssh/channel-type.c index 8e992ab..bac197e 100644 --- a/libguile-ssh/channel-type.c +++ b/libguile-ssh/channel-type.c @@ -263,7 +263,7 @@ equalp_channel (SCM x1, SCM x2) port. Asserts: - - mode has only SCM_RDNG and SCM_WRTNG bits set. + - FLAGS variable has only SCM_RDNG and SCM_WRTNG bits set. */ SCM _scm_from_channel_data (ssh_channel ch, SCM session, long flags) @@ -272,6 +272,8 @@ _scm_from_channel_data (ssh_channel ch, SCM session, long flags) SCM ptob; scm_port *pt; + assert ((flags & ~(SCM_RDNG | SCM_WRTNG)) == 0); + channel_data = scm_gc_malloc (sizeof (struct channel_data), "channel"); channel_data->ssh_channel = ch; @@ -295,8 +297,6 @@ _scm_from_channel_data (ssh_channel ch, SCM session, long flags) pt->read_pos = pt->read_buf; pt->read_end = pt->read_buf; - assert ((flags ^ (SCM_RDNG | SCM_WRTNG)) == 0); - SCM_SET_CELL_TYPE (ptob, channel_tag | flags); SCM_SETSTREAM (ptob, channel_data); |
