Check message format specifiers against error message for previous language SYNOPSIS check_message_format() err Error to check message for mess Message to check RETURN VALUE Returns 0 if no previous error message or message format is ok */
| 788 | Returns 0 if no previous error message or message format is ok |
| 789 | */ |
| 790 | static int check_message_format(struct errors *err, |
| 791 | const char* mess) |
| 792 | { |
| 793 | struct message *first; |
| 794 | DBUG_ENTER("check_message_format"); |
| 795 | |
| 796 | /* Get first message(if any) */ |
| 797 | if ((err->msg).elements == 0) |
| 798 | DBUG_RETURN(0); /* No previous message to compare against */ |
| 799 | |
| 800 | first= dynamic_element(&err->msg, 0, struct message*); |
| 801 | DBUG_ASSERT(first != NULL); |
| 802 | |
| 803 | if (checksum_format_specifier(first->text) != |
| 804 | checksum_format_specifier(mess)) |
| 805 | { |
| 806 | /* Check sum of format specifiers failed, they should be equal */ |
| 807 | DBUG_RETURN(1); |
| 808 | } |
| 809 | DBUG_RETURN(0); |
| 810 | } |
| 811 | |
| 812 | |
| 813 | /* |
no test coverage detected