diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2022-11-28 15:19:38 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2022-11-28 15:19:47 +0100 |
commit | f4854f39c6e1a7e130b4a33a15da1044801e0d1c (patch) | |
tree | 819db09c1c02f4c957f9a38e736c8d2b00f2faf0 | |
parent | 2b283b1a1a93b10a20dcc9f5668e200eb7cf3b5b (diff) |
osmo_tdef_get(): clarify API doc on val_if_not_present
Change-Id: I2301aad86d6d165a3b51c6849bcd8fe02972e0a3
-rw-r--r-- | src/tdef.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -200,8 +200,10 @@ void osmo_tdefs_reset(struct osmo_tdef *tdefs) * \param[in] tdefs Array of timer definitions, last entry must be fully zero initialized. * \param[in] T Timer number to get the value for. * \param[in] as_unit Return timeout value in this unit. - * \param[in] val_if_not_present Fallback value to return if no timeout is defined. + * \param[in] val_if_not_present Fallback value to return if no timeout is defined; if this is a negative number, a + * missing T timer definition aborts the program via OSMO_ASSERT(). * \return Timeout value in the unit given by as_unit, rounded up if necessary, or val_if_not_present. + * If val_if_not_present is negative and no T timer is defined, trigger OSMO_ASSERT() and do not return. */ unsigned long osmo_tdef_get(const struct osmo_tdef *tdefs, int T, enum osmo_tdef_unit as_unit, long val_if_not_present) { |