log_taget_find() should use enum log_target_type, not int

This has shown up in -Wsign-compare

Change-Id: I2f5ba81aa0328db7db29f49f26de4cea3f522789
This commit is contained in:
Harald Welte 2022-01-09 12:00:03 +01:00
parent 7d6166a0e3
commit e6fb890b98
2 changed files with 2 additions and 2 deletions

View File

@ -431,7 +431,7 @@ int log_targets_reopen(void);
void log_add_target(struct log_target *target); void log_add_target(struct log_target *target);
void log_del_target(struct log_target *target); void log_del_target(struct log_target *target);
struct log_target *log_target_find(int type, const char *fname); struct log_target *log_target_find(enum log_target_type type, const char *fname);
void log_enable_multithread(void); void log_enable_multithread(void);

View File

@ -1259,7 +1259,7 @@ struct log_target *log_target_create_file(const char *fname)
* \returns Log target (if found), NULL otherwise * \returns Log target (if found), NULL otherwise
* Must be called with mutex osmo_log_tgt_mutex held, see log_tgt_mutex_lock. * Must be called with mutex osmo_log_tgt_mutex held, see log_tgt_mutex_lock.
*/ */
struct log_target *log_target_find(int type, const char *fname) struct log_target *log_target_find(enum log_target_type type, const char *fname)
{ {
struct log_target *tgt; struct log_target *tgt;