since clnt_p*error() are expected to print an error message, print one if they're called with dodgy args. ;)
This commit is contained in:
parent
da0cbab431
commit
8a0f61568f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clnt_perror.c,v 1.18 1999/09/16 11:45:22 lukem Exp $ */
|
||||
/* $NetBSD: clnt_perror.c,v 1.19 1999/09/17 00:21:12 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@ -35,7 +35,7 @@
|
||||
static char *sccsid = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";
|
||||
static char *sccsid = "@(#)clnt_perror.c 2.1 88/07/29 4.0 RPCSRC";
|
||||
#else
|
||||
__RCSID("$NetBSD: clnt_perror.c,v 1.18 1999/09/16 11:45:22 lukem Exp $");
|
||||
__RCSID("$NetBSD: clnt_perror.c,v 1.19 1999/09/17 00:21:12 lukem Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -189,8 +189,11 @@ clnt_perror(rpch, s)
|
||||
_DIAGASSERT(rpch != NULL);
|
||||
_DIAGASSERT(s != NULL);
|
||||
#ifdef _DIAGNOSTIC
|
||||
if (rpch == NULL || s == NULL)
|
||||
if (rpch == NULL || s == NULL) {
|
||||
(void) fprintf(stderr,
|
||||
"ERROR: clnt_perror() called with NULL argument\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
(void) fprintf(stderr, "%s\n", clnt_sperror(rpch,s));
|
||||
@ -302,8 +305,11 @@ clnt_pcreateerror(s)
|
||||
|
||||
_DIAGASSERT(s != NULL);
|
||||
#ifdef _DIAGNOSTIC
|
||||
if (s == NULL)
|
||||
if (s == NULL) {
|
||||
(void) fprintf(stderr,
|
||||
"ERROR: clnt_pcreateerror() called with NULL argument\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
(void) fprintf(stderr, "%s\n", clnt_spcreateerror(s));
|
||||
|
Loading…
Reference in New Issue
Block a user