aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/use_count.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmocom/core/use_count.h')
-rw-r--r--include/osmocom/core/use_count.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/osmocom/core/use_count.h b/include/osmocom/core/use_count.h
index 6a4bf1f3..532d8b14 100644
--- a/include/osmocom/core/use_count.h
+++ b/include/osmocom/core/use_count.h
@@ -19,10 +19,6 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#pragma once
@@ -130,8 +126,9 @@ typedef int (* osmo_use_count_cb_t )(struct osmo_use_count_entry *use_count_entr
* int foo_use_cb(struct osmo_use_count_entry *use_count_entry, int32_t old_use_count, const char *file, int line)
* {
* struct foo *foo = use_count_entry->use_count->talloc_object;
- * if (osmo_use_count_total(&use_count_entry->use_count) == 0)
+ * if (osmo_use_count_total(use_count_entry->use_count) == 0)
* talloc_free(foo);
+ * return 0;
* }
*
* // The function name is a convenient use token:
@@ -215,6 +212,8 @@ int _osmo_use_count_get_put(struct osmo_use_count *uc, const char *use, int32_t
const char *file, int line);
const char *osmo_use_count_name_buf(char *buf, size_t buf_len, const struct osmo_use_count *uc);
+int osmo_use_count_to_str_buf(char *buf, size_t buf_len, const struct osmo_use_count *uc);
+char *osmo_use_count_to_str_c(void *ctx, const struct osmo_use_count *uc);
int32_t osmo_use_count_total(const struct osmo_use_count *uc);
int32_t osmo_use_count_by(const struct osmo_use_count *uc, const char *use);