From: mpi Date: Tue, 27 Feb 2024 12:38:12 +0000 (+0000) Subject: Make it possible to check for existing string in maps. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0cfb5c4ba1be73fffdffad353dd6ebbcc717cde9;p=openbsd Make it possible to check for existing string in maps. --- diff --git a/usr.sbin/btrace/btrace.c b/usr.sbin/btrace/btrace.c index 4450e98b83a..ce32989be91 100644 --- a/usr.sbin/btrace/btrace.c +++ b/usr.sbin/btrace/btrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: btrace.c,v 1.88 2024/02/24 19:42:54 mpi Exp $ */ +/* $OpenBSD: btrace.c,v 1.89 2024/02/27 12:38:12 mpi Exp $ */ /* * Copyright (c) 2019 - 2023 Martin Pieuchot @@ -1640,6 +1640,9 @@ ba2long(struct bt_arg *ba, struct dt_evt *dtev) long val; switch (ba->ba_type) { + case B_AT_STR: + val = (*ba2str(ba, dtev) == '\0') ? 0 : 1; + break; case B_AT_LONG: val = (long)ba->ba_value; break;