aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sparse.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-03-08 01:29:27 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-03-08 01:32:25 +0100
commit1749410ac473e918dcab1ea5e4e9e682f0ee2fe0 (patch)
tree066565f693ceb00ffa731590aad15ccb37bf44c9 /sparse.c
parente0f904856b3d665a84b4342b79967b97a3739545 (diff)
parentf94f4a89ff6f31384cdfe77b5084601e7de2a131 (diff)
downloadsparse-dev-1749410ac473e918dcab1ea5e4e9e682f0ee2fe0.tar.gz
Merge branch 'ptrlist-generic'
* ptrlist: small API improvements These improvements will be used by various incoming series. Thanks to Ramsay Jones for finding a bunch of typos and suggesting some improved phrasing. -- Luc
Diffstat (limited to 'sparse.c')
-rw-r--r--sparse.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/sparse.c b/sparse.c
index 151eaf4e..9d62d4fe 100644
--- a/sparse.c
+++ b/sparse.c
@@ -163,20 +163,9 @@ static void check_byte_count(struct instruction *insn, pseudo_t count)
/* OK, we could try to do the range analysis here */
}
-static pseudo_t argument(struct instruction *call, unsigned int argno)
-{
- pseudo_t args[8];
- struct ptr_list *arg_list = (struct ptr_list *) call->arguments;
-
- argno--;
- if (linearize_ptr_list(arg_list, (void *)args, 8) > argno)
- return args[argno];
- return NULL;
-}
-
static void check_memset(struct instruction *insn)
{
- check_byte_count(insn, argument(insn, 3));
+ check_byte_count(insn, ptr_list_nth(insn->arguments, 3));
}
#define check_memcpy check_memset