diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2006-09-17 17:00:39 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2006-09-17 17:00:39 +0000 |
commit | 84332de79a46f5a478725d5b46db2dbcc2224c84 (patch) | |
tree | 3132012dcd853e46bd091f6fd5f50a2cf3804f8c /lib/libc/rpc | |
parent | 8d22d9f738c3ea8832971e76ebf28f5adc91b422 (diff) |
dont put two '\n' at the end of the string returnd by clnt_sperror()
ok deraadt@
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r-- | lib/libc/rpc/clnt_perror.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/rpc/clnt_perror.c b/lib/libc/rpc/clnt_perror.c index 7ecb0fc6e8f..788569b39e1 100644 --- a/lib/libc/rpc/clnt_perror.c +++ b/lib/libc/rpc/clnt_perror.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clnt_perror.c,v 1.18 2005/08/08 08:05:35 espie Exp $ */ +/* $OpenBSD: clnt_perror.c,v 1.19 2006/09/17 17:00:38 thib Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape @@ -99,11 +99,11 @@ clnt_sperror(CLIENT *rpch, char *s) case RPC_CANTSEND: case RPC_CANTRECV: - snprintf(str, len, "; errno = %s\n", strerror(e.re_errno)); + snprintf(str, len, "; errno = %s", strerror(e.re_errno)); break; case RPC_VERSMISMATCH: - snprintf(str, len, "; low version = %u, high version = %u\n", + snprintf(str, len, "; low version = %u, high version = %u", e.re_vers.low, e.re_vers.high); break; @@ -119,21 +119,21 @@ clnt_sperror(CLIENT *rpch, char *s) goto truncated; err = auth_errmsg(e.re_why); if (err != NULL) { - snprintf(str, len, "%s\n", err); + snprintf(str, len, "%s", err); } else { snprintf(str, len, - "(unknown authentication error - %d)\n", + "(unknown authentication error - %d)", (int) e.re_why); } break; case RPC_PROGVERSMISMATCH: - snprintf(str, len, "; low version = %u, high version = %u\n", + snprintf(str, len, "; low version = %u, high version = %u", e.re_vers.low, e.re_vers.high); break; default: /* unknown */ - snprintf(str, len, "; s1 = %u, s2 = %u\n", + snprintf(str, len, "; s1 = %u, s2 = %u", e.re_lb.s1, e.re_lb.s2); break; } |