summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld/lib.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-02-12 21:17:54 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-02-12 21:17:54 +0000
commit447ae244135ecd8dc37c03d39c113080fb7dcaed (patch)
tree512491baf623376e1bd59985ee97931f6d3dfee5 /gnu/usr.bin/ld/lib.c
parent846cc249b75ff1ea72b01601c5ae38dab7f2fc8b (diff)
Fix a few warnings, including an uninitialized variable in an error case.
Diffstat (limited to 'gnu/usr.bin/ld/lib.c')
-rw-r--r--gnu/usr.bin/ld/lib.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gnu/usr.bin/ld/lib.c b/gnu/usr.bin/ld/lib.c
index cbd41719949..9b2563c31ab 100644
--- a/gnu/usr.bin/ld/lib.c
+++ b/gnu/usr.bin/ld/lib.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: lib.c,v 1.12 2003/05/07 21:52:13 vincent Exp $ - library routines*/
+/* * $OpenBSD: lib.c,v 1.13 2008/02/12 21:17:53 miod Exp $ - library routines*/
/*
*/
@@ -634,10 +634,11 @@ read_shared_object(int fd, struct file_entry *entry)
errx(1, "%s: premature EOF reading symbols ",
get_file_name(entry));
- if (has_nz)
+ if (has_nz) {
md_swapin_zsymbols(nzp, entry->nsymbols);
- else
+ } else {
md_swapin_symbols(np, entry->nsymbols);
+ }
/* Convert to structs localsymbol */
for (i = 0; i < entry->nsymbols; i++) {
@@ -824,7 +825,7 @@ findlib(struct file_entry *p)
dot_a:
p->flags &= ~E_SEARCH_DYNAMIC;
- if (cp = strrchr(p->filename, '/')) {
+ if ((cp = strrchr(p->filename, '/'))) {
char *tmp;
*cp++ = '\0';
tmp = concat(p->filename, "/lib", cp);