mod_rewrite: disambiguate select_random_value_part().

gcc-13's -fsanitize=undefined finds:

    mod_rewrite.c|1702 col 37| error: '%s' directive argument is null [-Werror=format-overflow=]
    ||  1701 |             value = select_random_value_part(r, value);
    ||  1702 |             rewritelog((r, 5, NULL, "randomly chosen the subvalue `%s'",value));
    ||       |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

because it's not clear from select_random_value_part() whether it can return NULL or not.
Rewrite the function so that it's clearer/simpler.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916298 13f79535-47bb-0310-9956-ffa450edef68
1 file changed