message: Consistently initialize locator; use 0 for "no line number".
[pspp] / src / libpspp / getl.c
index 43d2a56f460d8f645a61ee86dc5e457c862a9efc..9db6c3ae56260d3be735efd45588622b4eb2077b 100644 (file)
@@ -212,18 +212,18 @@ getl_source_name (const struct source_stream *ss)
   return s->interface->name (s->interface);
 }
 
-/* Returns the location within the current source, or -1 if there is
-   no current source */
+/* Returns the line number within the current source, or 0 if there is no
+   current source. */
 int
 getl_source_location (const struct source_stream *ss)
 {
   const struct getl_source *s = current_source (ss);
 
   if ( ll_is_empty (&ss->sources) )
-    return -1;
+    return 0;
 
   if ( !s->interface->location )
-    return -1;
+    return 0;
 
   return s->interface->location (s->interface);
 }