diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2010-08-11 01:14:28 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2010-08-11 01:14:28 +0000 |
commit | 5f0d4c915d87938445313e5481a3ccd7ccfbeedf (patch) | |
tree | 6e5ff09f9d418ae7573c9c487005a7ca6f1b99d7 /libexec/ld.so | |
parent | 405094ed62c8af656ba68fbb39c09b1fe8844540 (diff) |
Make _dl_searchnum signed as originally intended.
Pointed out by patrick keshish.
Diffstat (limited to 'libexec/ld.so')
-rw-r--r-- | libexec/ld.so/resolve.c | 9 | ||||
-rw-r--r-- | libexec/ld.so/resolve.h | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/libexec/ld.so/resolve.c b/libexec/ld.so/resolve.c index ff516f6a3be..04da66f00c6 100644 --- a/libexec/ld.so/resolve.c +++ b/libexec/ld.so/resolve.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolve.c,v 1.50 2010/07/01 19:25:44 drahn Exp $ */ +/* $OpenBSD: resolve.c,v 1.51 2010/08/11 01:14:27 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -303,15 +303,16 @@ _dl_find_symbol_bysym(elf_object_t *req_obj, unsigned int symidx, return ret; } -uint32_t _dl_searchnum = 0; +int _dl_searchnum = 0; void _dl_newsymsearch(void) { _dl_searchnum += 1; if (_dl_searchnum < 0) { - /* if the signed number roll over, reset - * all counters so we dont get accidental collision + /* + * If the signed number rolls over, reset all counters so + * we dont get accidental collision. */ elf_object_t *walkobj; for (walkobj = _dl_objects; diff --git a/libexec/ld.so/resolve.h b/libexec/ld.so/resolve.h index b259941c722..e6272c12747 100644 --- a/libexec/ld.so/resolve.h +++ b/libexec/ld.so/resolve.h @@ -1,4 +1,4 @@ -/* $OpenBSD: resolve.h,v 1.60 2010/07/01 19:25:44 drahn Exp $ */ +/* $OpenBSD: resolve.h,v 1.61 2010/08/11 01:14:27 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -280,7 +280,7 @@ TAILQ_HEAD(dlochld, dep_node); extern struct dlochld _dlopened_child_list; /* variables used to avoid duplicate node checking */ -uint32_t _dl_searchnum; +int _dl_searchnum; uint32_t _dl_skipnum; void _dl_newsymsearch(void); |