Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so Very minor cleanup of the previous.



details:   https://anonhg.NetBSD.org/src/rev/8b6efe55f24d
branches:  trunk
changeset: 536898:8b6efe55f24d
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Tue Sep 24 00:02:46 2002 +0000

description:
Very minor cleanup of the previous.

diffstat:

 libexec/ld.elf_so/search.c |  15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diffs (54 lines):

diff -r ad407a36f895 -r 8b6efe55f24d libexec/ld.elf_so/search.c
--- a/libexec/ld.elf_so/search.c        Mon Sep 23 23:56:46 2002 +0000
+++ b/libexec/ld.elf_so/search.c        Tue Sep 24 00:02:46 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: search.c,v 1.11 2002/09/23 23:56:49 mycroft Exp $       */
+/*     $NetBSD: search.c,v 1.12 2002/09/24 00:02:46 mycroft Exp $       */
 
 /*
  * Copyright 1996 Matt Thomas <matt%3am-software.com@localhost>
@@ -119,11 +119,11 @@
                        (void)strcpy(pathname, LIBDIR);
                        (void)strcpy(pathname + LIBDIRLEN, name +
                            SVR4_LIBDIRLEN);
-                       goto found2;
+                       goto found;
                }
 #endif /* SVR4_LIBDIR */
                pathname = xstrdup(name);
-               goto found2;
+               goto found;
        }
        dbg((" Searching for \"%s\" (%p)", name, refobj));
 
@@ -132,26 +132,25 @@
        for (sp = _rtld_paths; sp != NULL; sp = sp->sp_next)
                if ((obj = _rtld_search_library_path(name, namelen,
                    sp->sp_path, sp->sp_pathlen, mode)) != NULL)
-                       goto found;
+                       return obj;
 
        if (refobj != NULL)
                for (sp = refobj->rpaths; sp != NULL; sp = sp->sp_next)
                        if ((obj = _rtld_search_library_path(name,
                            namelen, sp->sp_path, sp->sp_pathlen, mode)) != NULL)
-                               goto found;
+                               return obj;
 
        for (sp = _rtld_default_paths; sp != NULL; sp = sp->sp_next)
                if ((obj = _rtld_search_library_path(name, namelen,
                    sp->sp_path, sp->sp_pathlen, mode)) != NULL)
-                       goto found;
+                       return obj;
 
        _rtld_error("Shared object \"%s\" not found", name);
        return NULL;
 
-found2:
+found:
        obj = _rtld_load_object(pathname, mode);
        if (obj == NULL)
                free(pathname);
-found:
        return obj;
 }



Home | Main Index | Thread Index | Old Index