|
From: | John E. Malmberg |
Subject: | Re: Bash-4.3 Official Patch 30 |
Date: | Mon, 06 Oct 2014 17:16:46 -0500 |
User-agent: | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 |
On 10/6/2014 6:43 AM, Chet Ramey wrote:
On 10/6/14, 1:35 AM, tsugutomo.enami@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
[Prev in Thread] | Current Thread | [Next in Thread] |