mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
Make options_get_datadir_fname2_suffix() mockable
This commit is contained in:
parent
35fc5879fb
commit
2a17b93cc4
@ -7229,10 +7229,10 @@ init_libevent(const or_options_t *options)
|
|||||||
*
|
*
|
||||||
* Note: Consider using the get_datadir_fname* macros in or.h.
|
* Note: Consider using the get_datadir_fname* macros in or.h.
|
||||||
*/
|
*/
|
||||||
char *
|
MOCK_IMPL(char *,
|
||||||
options_get_datadir_fname2_suffix(const or_options_t *options,
|
options_get_datadir_fname2_suffix,(const or_options_t *options,
|
||||||
const char *sub1, const char *sub2,
|
const char *sub1, const char *sub2,
|
||||||
const char *suffix)
|
const char *suffix))
|
||||||
{
|
{
|
||||||
char *fname = NULL;
|
char *fname = NULL;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
@ -53,9 +53,11 @@ config_line_t *option_get_assignment(const or_options_t *options,
|
|||||||
const char *key);
|
const char *key);
|
||||||
int options_save_current(void);
|
int options_save_current(void);
|
||||||
const char *get_torrc_fname(int defaults_fname);
|
const char *get_torrc_fname(int defaults_fname);
|
||||||
char *options_get_datadir_fname2_suffix(const or_options_t *options,
|
MOCK_DECL(char *,
|
||||||
|
options_get_datadir_fname2_suffix,
|
||||||
|
(const or_options_t *options,
|
||||||
const char *sub1, const char *sub2,
|
const char *sub1, const char *sub2,
|
||||||
const char *suffix);
|
const char *suffix));
|
||||||
#define get_datadir_fname2_suffix(sub1, sub2, suffix) \
|
#define get_datadir_fname2_suffix(sub1, sub2, suffix) \
|
||||||
options_get_datadir_fname2_suffix(get_options(), (sub1), (sub2), (suffix))
|
options_get_datadir_fname2_suffix(get_options(), (sub1), (sub2), (suffix))
|
||||||
/** Return a newly allocated string containing datadir/sub1. See
|
/** Return a newly allocated string containing datadir/sub1. See
|
||||||
|
Loading…
Reference in New Issue
Block a user