mirror of
https://github.com/reactos/ccache.git
synced 2025-03-03 16:27:22 +00:00
Allow const string parameters to CHECK_STR_EQ()
This commit is contained in:
parent
57d640d42b
commit
5d8643612d
@ -204,7 +204,8 @@ cct_check_uns_eq(const char *file, int line, const char *expression,
|
||||
|
||||
int
|
||||
cct_check_str_eq(const char *file, int line, const char *expression,
|
||||
char *expected, char *actual, int free1, int free2)
|
||||
const char *expected, const char *actual, int free1,
|
||||
int free2)
|
||||
{
|
||||
int result;
|
||||
|
||||
@ -221,10 +222,10 @@ cct_check_str_eq(const char *file, int line, const char *expression,
|
||||
}
|
||||
|
||||
if (free1) {
|
||||
free(expected);
|
||||
free((char *)expected);
|
||||
}
|
||||
if (free2) {
|
||||
free(actual);
|
||||
free((char *)actual);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -135,7 +135,8 @@ int cct_check_int_eq(const char *file, int line, const char *expression,
|
||||
int cct_check_uns_eq(const char *file, int line, const char *expression,
|
||||
unsigned expected, unsigned actual);
|
||||
int cct_check_str_eq(const char *file, int line, const char *expression,
|
||||
char *expected, char *actual, int free1, int free2);
|
||||
const char *expected, const char *actual, int free1,
|
||||
int free2);
|
||||
int cct_check_args_eq(const char *file, int line, const char *expression,
|
||||
struct args *expected, struct args *actual,
|
||||
int free1, int free2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user