summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/stream.c b/stream.c
index 7122b6ff..75b51c97 100644
--- a/stream.c
+++ b/stream.c
@@ -1321,8 +1321,7 @@ val close_stream(val stream, val throw_on_error)
val get_line(val stream)
{
- if (!stream)
- stream = std_input;
+ stream = default_arg(stream, std_input);
type_check (stream, COBJ);
type_assert (stream->co.cls == stream_s, (lit("~a is not a stream"),
@@ -1336,8 +1335,7 @@ val get_line(val stream)
val get_char(val stream)
{
- if (!stream)
- stream = std_input;
+ stream = default_arg(stream, std_input);
type_check (stream, COBJ);
type_assert (stream->co.cls == stream_s, (lit("~a is not a stream"),
@@ -1351,8 +1349,7 @@ val get_char(val stream)
val get_byte(val stream)
{
- if (!stream)
- stream = std_input;
+ stream = default_arg(stream, std_input);
type_check (stream, COBJ);
type_assert (stream->co.cls == stream_s, (lit("~a is not a stream"),