https://issues.apache.org/bugzilla/show_bug.cgi?id=55696

--- Comment #2 from Christopher Schultz <ch...@christopherschultz.net> ---
Honestly, I'm not even sure why the code is written this way.

  char buf[];
  sprintf(buf, "%d", default_value);
  char *rc = jk_map_get_string(m, name, buf);
  size_t len = strlen(rc);
  if(len)  {
     // parse rc -> int_res
  } else {
    int_res = default_value;
  }

  return int_res;

Why bother at all with the whole default int -> string -> int garbage? Why not
simply pass NULL as the default value to jk_map_get_string and check for either
NULL or 0==len afterward?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to