diff options
author | 2017-05-28 14:24:19 +0000 | |
---|---|---|
committer | 2017-05-28 14:24:19 +0000 | |
commit | ed3d2e342248f873e6ec687675af99dc5edae62e (patch) | |
tree | efb302692fb5b3e7404be20a8f7120687704793a /sys/ddb/db_ctf.c | |
parent | Call bpf_mtap_af() a bit earlier in ipip_input(). This prepares (diff) | |
download | wireguard-openbsd-ed3d2e342248f873e6ec687675af99dc5edae62e.tar.xz wireguard-openbsd-ed3d2e342248f873e6ec687675af99dc5edae62e.zip |
If a function is not found in the CTF data, do not assume it takes no
argument.
Diffstat (limited to 'sys/ddb/db_ctf.c')
-rw-r--r-- | sys/ddb/db_ctf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ddb/db_ctf.c b/sys/ddb/db_ctf.c index be5060ba43c..fa2f04656e1 100644 --- a/sys/ddb/db_ctf.c +++ b/sys/ddb/db_ctf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_ctf.c,v 1.7 2017/05/28 11:41:52 mpi Exp $ */ +/* $OpenBSD: db_ctf.c,v 1.8 2017/05/28 14:24:19 mpi Exp $ */ /* * Copyright (c) 2016 Jasper Lievisse Adriaanse <jasper@openbsd.org> @@ -160,7 +160,7 @@ db_ctf_func_numargs(const char *funcname) size_t i, idx = 0; if (!db_ctf.ctf_found) - return 0; + return -1; fstart = (uint16_t *)(db_ctf.data + db_ctf.cth->cth_funcoff); fend = (uint16_t *)(db_ctf.data + db_ctf.cth->cth_typeoff); @@ -189,7 +189,7 @@ db_ctf_func_numargs(const char *funcname) return vlen; } - return 0; + return -1; } static const char * |