check whether a user-supplied option string is a proper leading substring of a particular option name; option string might have a colon or equals sign and arbitrary value appended to it */
| 6757 | substring of a particular option name; option string might have |
| 6758 | a colon or equals sign and arbitrary value appended to it */ |
| 6759 | boolean |
| 6760 | match_optname(const char *user_string, const char *optn_name, |
| 6761 | int min_length, boolean val_allowed) |
| 6762 | { |
| 6763 | int len = (int) strlen(user_string); |
| 6764 | |
| 6765 | if (val_allowed) |
| 6766 | len = length_without_val(user_string, len); |
| 6767 | |
| 6768 | return (boolean) (len >= min_length |
| 6769 | && !strncmpi(optn_name, user_string, len)); |
| 6770 | } |
| 6771 | |
| 6772 | void |
| 6773 | reset_duplicate_opt_detection(void) |
no test coverage detected