Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/dhcp/minires fix some obviously botched error returns



details:   https://anonhg.NetBSD.org/src/rev/5b85677e7f00
branches:  trunk
changeset: 511441:5b85677e7f00
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Jun 19 13:54:58 2001 +0000

description:
fix some obviously botched error returns

diffstat:

 usr.sbin/dhcp/minires/ns_samedomain.c   |  4 ++--
 usr.sbin/dhcp/minires/ns_sign.c         |  8 ++++----
 usr.sbin/dhcp/minires/res_findzonecut.c |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diffs (79 lines):

diff -r 44129a3c7379 -r 5b85677e7f00 usr.sbin/dhcp/minires/ns_samedomain.c
--- a/usr.sbin/dhcp/minires/ns_samedomain.c     Tue Jun 19 13:45:52 2001 +0000
+++ b/usr.sbin/dhcp/minires/ns_samedomain.c     Tue Jun 19 13:54:58 2001 +0000
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ns_samedomain.c,v 1.1.1.2 2001/04/02 21:57:08 mellon Exp $";
+static const char rcsid[] = "$Id: ns_samedomain.c,v 1.2 2001/06/19 13:54:58 drochner Exp $";
 #endif
 
 #include <sys/types.h>
@@ -168,7 +168,7 @@
        size_t n = strlen(src);
 
        if (n + sizeof "." > dstsize) {
-               ISC_R_NOSPACE;
+               return ISC_R_NOSPACE;
        }
        strcpy(dst, src);
        while (n > 0 && dst[n - 1] == '.')              /* Ends in "." */
diff -r 44129a3c7379 -r 5b85677e7f00 usr.sbin/dhcp/minires/ns_sign.c
--- a/usr.sbin/dhcp/minires/ns_sign.c   Tue Jun 19 13:45:52 2001 +0000
+++ b/usr.sbin/dhcp/minires/ns_sign.c   Tue Jun 19 13:54:58 2001 +0000
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ns_sign.c,v 1.1.1.3 2001/06/18 18:13:20 drochner Exp $";
+static const char rcsid[] = "$Id: ns_sign.c,v 1.2 2001/06/19 13:54:58 drochner Exp $";
 #endif
 
 #if defined (TRACING)
@@ -87,7 +87,7 @@
 
        dst_init();
        if (msg == NULL || msglen == NULL || sig == NULL || siglen == NULL)
-               ISC_R_INVALIDARG;
+               return ISC_R_INVALIDARG;
 
        /* Name. */
        if (key != NULL && error != ns_r_badsig && error != ns_r_badkey)
@@ -118,7 +118,7 @@
        else
                n = dn_comp("", cp, (unsigned)(eob - cp), NULL, NULL);
        if (n < 0)
-               ISC_R_NOSPACE;
+               return ISC_R_NOSPACE;
        alg = cp;
        cp += n;
        
@@ -190,7 +190,7 @@
                n = dst_sign_data(SIG_MODE_FINAL, key, &ctx, NULL, 0,
                                  sig, *siglen);
                if (n < 0)
-                       ISC_R_BADKEY;
+                       return ISC_R_BADKEY;
                *siglen = n;
        } else
                *siglen = 0;
diff -r 44129a3c7379 -r 5b85677e7f00 usr.sbin/dhcp/minires/res_findzonecut.c
--- a/usr.sbin/dhcp/minires/res_findzonecut.c   Tue Jun 19 13:45:52 2001 +0000
+++ b/usr.sbin/dhcp/minires/res_findzonecut.c   Tue Jun 19 13:54:58 2001 +0000
@@ -1,5 +1,5 @@
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_findzonecut.c,v 1.1.1.8 2001/06/18 18:13:21 drochner Exp $";
+static const char rcsid[] = "$Id: res_findzonecut.c,v 1.2 2001/06/19 13:54:58 drochner Exp $";
 #endif /* not lint */
 
 /*
@@ -355,7 +355,7 @@
                while (*dname != '.') {
                        if (*dname == '\\')
                                if (*++dname == '\0') {
-                                       ISC_R_NOSPACE;
+                                       return ISC_R_NOSPACE;
                                }
                        dname++;
                }



Home | Main Index | Thread Index | Old Index