Source-Changes-HG archive

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

[src/trunk]: src/sbin/modload Fix entry point parsing if output file specifie...



details:   https://anonhg.NetBSD.org/src/rev/c1867b186716
branches:  trunk
changeset: 472164:c1867b186716
user:      abs <abs%NetBSD.org@localhost>
date:      Fri Apr 23 17:47:02 1999 +0000

description:
Fix entry point parsing if output file specified to modload (PR7352)

diffstat:

 sbin/modload/modload.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 6d088ea34df9 -r c1867b186716 sbin/modload/modload.c
--- a/sbin/modload/modload.c    Fri Apr 23 15:25:41 1999 +0000
+++ b/sbin/modload/modload.c    Fri Apr 23 17:47:02 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: modload.c,v 1.22 1999/01/13 23:07:30 sommerfe Exp $    */
+/*     $NetBSD: modload.c,v 1.23 1999/04/23 17:47:02 abs Exp $ */
 
 /*
  * Copyright (c) 1993 Terrence R. Lambert.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: modload.c,v 1.22 1999/01/13 23:07:30 sommerfe Exp $");
+__RCSID("$NetBSD: modload.c,v 1.23 1999/04/23 17:47:02 abs Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -266,10 +266,9 @@
        p = strrchr(modout, '.');
        if (!p || strcmp(p, ".o"))
                errx(2, "module object must end in .o");
-       if (out == NULL) {
+       *p = '\0';
+       if (out == NULL)
                out = modout;
-               *p = '\0';
-       }
 
        /*
         * Verify that the entry point for the module exists.



Home | Main Index | Thread Index | Old Index