combined string/int comparison for compatibility with ssl_expr */
| 321 | |
| 322 | /* combined string/int comparison for compatibility with ssl_expr */ |
| 323 | static int strcmplex(const char *str1, const char *str2) |
| 324 | { |
| 325 | apr_size_t i, n1, n2; |
| 326 | |
| 327 | if (str1 == NULL) |
| 328 | return -1; |
| 329 | if (str2 == NULL) |
| 330 | return +1; |
| 331 | n1 = strlen(str1); |
| 332 | n2 = strlen(str2); |
| 333 | if (n1 > n2) |
| 334 | return 1; |
| 335 | if (n1 < n2) |
| 336 | return -1; |
| 337 | for (i = 0; i < n1; i++) { |
| 338 | if (str1[i] > str2[i]) |
| 339 | return 1; |
| 340 | if (str1[i] < str2[i]) |
| 341 | return -1; |
| 342 | } |
| 343 | return 0; |
| 344 | } |
| 345 | |
| 346 | static int ssl_expr_eval_comp(ap_expr_eval_ctx_t *ctx, const ap_expr_t *node) |
| 347 | { |
no outgoing calls
no test coverage detected