On 10/6/2014 6:43 AM, Chet Ramey wrote:
On 10/6/14, 1:35 AM, tsugutomo.en...@jp.sony.com wrote:
Hi,

+ char *
+ parser_remaining_input ()
+ {
+   if (shell_input_line == 0)
+     return 0;
+   if (shell_input_line_index < 0 || shell_input_line_index >= 
shell_input_line_len)
+     return '\0';      /* XXX */

Do you mean return ""; ?

Yes, good catch.  It doesn't make a difference: clang and gcc both accept
it as written and it behaves as desired.  However, I'll change it for the
next version.

Changing it to return 0 instead of '\0' would probably be more clear.
No need to return a pointer to a static empty string.

Regards,
-John
wb8tyw@qsl.network






Reply via email to