From 9655ed5cf542d903570420fb95d7702f9af6ae05 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 11 Sep 2019 01:48:11 +0200 Subject: tdef: fixup osmo_tdef_set() I missed code review, so here are my comments in form of a follow-up patch for Id56a1226d724a374f04231df85fe5b49ffd2c43c. - Fix 'as_unit' arg name to 'val_unit' as in the C file and API doc. - Explain rounding-up behavior of value conversion in API doc. - Use osmo_tdef_get_entry() instead of a loop. Related: OS#4190 Change-Id: Ia91c2f17e40fb9e79ffa5a7f28ce9c3605664402 --- include/osmocom/core/tdef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/osmocom/core/tdef.h b/include/osmocom/core/tdef.h index a1ad4ccb..81556883 100644 --- a/include/osmocom/core/tdef.h +++ b/include/osmocom/core/tdef.h @@ -97,7 +97,7 @@ void osmo_tdefs_reset(struct osmo_tdef *tdefs); unsigned long osmo_tdef_get(const struct osmo_tdef *tdefs, int T, enum osmo_tdef_unit as_unit, long val_if_not_present); struct osmo_tdef *osmo_tdef_get_entry(struct osmo_tdef *tdefs, int T); -int osmo_tdef_set(struct osmo_tdef *tdefs, int T, unsigned long val, enum osmo_tdef_unit as_unit); +int osmo_tdef_set(struct osmo_tdef *tdefs, int T, unsigned long val, enum osmo_tdef_unit val_unit); /*! Using osmo_tdef for osmo_fsm_inst: array entry for a mapping of state numbers to timeout definitions. * For a usage example, see osmo_tdef_get_state_timeout() and test_tdef_state_timeout() in tdef_test.c. */ -- cgit v1.2.3