fix some obviously botched error returns

This commit is contained in:
drochner 2001-06-19 13:54:58 +00:00
parent ac951736bc
commit d94b2b3963
3 changed files with 8 additions and 8 deletions

View File

@ -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 @@ ns_makecanon(const char *src, char *dst, size_t dstsize) {
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 "." */

View File

@ -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 @@ ns_sign(u_char *msg, unsigned *msglen, unsigned msgsize, int error, void *k,
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 @@ ns_sign(u_char *msg, unsigned *msglen, unsigned msgsize, int error, void *k,
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 @@ ns_sign(u_char *msg, unsigned *msglen, unsigned msgsize, int error, void *k,
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;

View File

@ -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 @@ get_soa(res_state statp, const char *dname, ns_class class,
while (*dname != '.') {
if (*dname == '\\')
if (*++dname == '\0') {
ISC_R_NOSPACE;
return ISC_R_NOSPACE;
}
dname++;
}