diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/ttyname.c | 4 | ||||
-rw-r--r-- | lib/libc/rpc/crypt_client.c | 1 | ||||
-rw-r--r-- | lib/libc/rpc/svc_vc.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/gen/ttyname.c b/lib/libc/gen/ttyname.c index a21b77f..02aa158 100644 --- a/lib/libc/gen/ttyname.c +++ b/lib/libc/gen/ttyname.c @@ -65,7 +65,7 @@ ttyname_r(int fd, char *buf, size_t len) /* Must be a terminal. */ if (!isatty(fd)) - return (ENOTTY); + return (errno); /* Must have enough room */ if (len <= sizeof(_PATH_DEV)) return (ERANGE); @@ -73,7 +73,7 @@ ttyname_r(int fd, char *buf, size_t len) strcpy(buf, _PATH_DEV); used = strlen(buf); if (fdevname_r(fd, buf + used, len - used) == NULL) - return (ENOTTY); + return (errno == EINVAL ? ERANGE : errno); return (0); } diff --git a/lib/libc/rpc/crypt_client.c b/lib/libc/rpc/crypt_client.c index 4e5c793..5290021 100644 --- a/lib/libc/rpc/crypt_client.c +++ b/lib/libc/rpc/crypt_client.c @@ -64,6 +64,7 @@ _des_crypt_call(buf, len, dparms) } if (nconf == NULL) { warnx("getnetconfig: %s", nc_sperror()); + endnetconfig(localhandle); return(DESERR_HWERROR); } clnt = clnt_tp_create(NULL, CRYPT_PROG, CRYPT_VERS, nconf); diff --git a/lib/libc/rpc/svc_vc.c b/lib/libc/rpc/svc_vc.c index f830425..aa45396 100644 --- a/lib/libc/rpc/svc_vc.c +++ b/lib/libc/rpc/svc_vc.c @@ -128,7 +128,7 @@ svc_vc_create(fd, sendsize, recvsize) u_int sendsize; u_int recvsize; { - SVCXPRT *xprt; + SVCXPRT *xprt = NULL; struct cf_rendezvous *r = NULL; struct __rpc_sockinfo si; struct sockaddr_storage sslocal; |