* xmlResetError: * @err: pointer to the error. * * Cleanup the error. */
| 933 | * Cleanup the error. |
| 934 | */ |
| 935 | void |
| 936 | xmlResetError(xmlErrorPtr err) |
| 937 | { |
| 938 | if (err == NULL) |
| 939 | return; |
| 940 | if (err->code == XML_ERR_OK) |
| 941 | return; |
| 942 | if (err->message != NULL) |
| 943 | xmlFree(err->message); |
| 944 | if (err->file != NULL) |
| 945 | xmlFree(err->file); |
| 946 | if (err->str1 != NULL) |
| 947 | xmlFree(err->str1); |
| 948 | if (err->str2 != NULL) |
| 949 | xmlFree(err->str2); |
| 950 | if (err->str3 != NULL) |
| 951 | xmlFree(err->str3); |
| 952 | memset(err, 0, sizeof(xmlError)); |
| 953 | err->code = XML_ERR_OK; |
| 954 | } |
| 955 | |
| 956 | /** |
| 957 | * xmlResetLastError: |
no outgoing calls
no test coverage detected