diff --git a/gio/gdatainputstream.c b/gio/gdatainputstream.c
index 2407637..36fc605 100644
--- a/gio/gdatainputstream.c
+++ b/gio/gdatainputstream.c
@@ -976,7 +976,7 @@ g_data_input_stream_read_line_ready (GObject      *object,
 {
   GDataInputStreamReadData *data = user_data;
   gssize found_pos;
-  gint newline_len;
+  gint stop_len;
 
   if (result)
     /* this is a callback.  finish the async call. */
@@ -1009,11 +1009,11 @@ g_data_input_stream_read_line_ready (GObject      *object,
       found_pos = scan_for_chars (data->stream,
                                   &data->checked,
                                   data->stop_chars);
-      newline_len = 0;
+      stop_len = 1;
     }
   else
     found_pos = scan_for_newline (data->stream, &data->checked,
-                                  &data->last_saw_cr, &newline_len);
+                                  &data->last_saw_cr, &stop_len);
 
   if (found_pos == -1)
     /* didn't find a full line; need to buffer some more bytes */
@@ -1037,7 +1037,7 @@ g_data_input_stream_read_line_ready (GObject      *object,
     {
       /* read the line and the EOL.  no error is possible. */
       g_data_input_stream_read_complete (data, found_pos,
-                                         newline_len, result == NULL);
+                                         stop_len, result == NULL);
     }
 }
 
