Commit 27e8da79 authored by reggie@fedora.(none)'s avatar reggie@fedora.(none)

improved previous changeset per JimW's review

parent 53089ec4
...@@ -340,7 +340,7 @@ int Instance_options::complete_initialization(const char *default_path, ...@@ -340,7 +340,7 @@ int Instance_options::complete_initialization(const char *default_path,
// it's safe to cast this to char* since this is a buffer we are allocating // it's safe to cast this to char* since this is a buffer we are allocating
char* end= convert_dirname((char*)mysqld_path, mysqld_path, NullS); char* end= convert_dirname((char*)mysqld_path, mysqld_path, NullS);
end[-1] = 0; end[-1]= 0;
mysqld_path_len= strlen(mysqld_path); mysqld_path_len= strlen(mysqld_path);
......
...@@ -29,7 +29,7 @@ void trim_space(const char **text, uint *word_len) ...@@ -29,7 +29,7 @@ void trim_space(const char **text, uint *word_len)
const char* start = *text; const char* start = *text;
while (*start != 0 && *start == ' ') while (*start != 0 && *start == ' ')
start++; start++;
*text = start; *text= start;
int len= strlen(start); int len= strlen(start);
const char* end= start + len - 1; const char* end= start + len - 1;
...@@ -108,7 +108,7 @@ int parse_output_and_get_value(const char *command, const char *word, ...@@ -108,7 +108,7 @@ int parse_output_and_get_value(const char *command, const char *word,
linep+= wordlen; /* swallow the previous one */ linep+= wordlen; /* swallow the previous one */
if (flag & GET_VALUE) if (flag & GET_VALUE)
{ {
get_word((const char **) &linep, &found_word_len, NONSPACE); trim_space((const char**) &linep, &found_word_len);
if (input_buffer_len <= found_word_len) if (input_buffer_len <= found_word_len)
goto err; goto err;
strmake(result, linep, found_word_len); strmake(result, linep, found_word_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment