diff options
author | dim <dim@FreeBSD.org> | 2015-02-02 20:18:47 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-02-02 20:18:47 +0000 |
commit | 8dc847406524920db5b69acab7d3f942c5ea65d3 (patch) | |
tree | ea2cc467314a8ce8270c4ebfdce7e4b5c9363c24 /lib/libc | |
parent | bcd1c03c73ca4eef3dfd13843ff1597c4fed712c (diff) | |
parent | 54f475a481803dda7e9fcd95edd11d0c5f9a2bf1 (diff) | |
download | FreeBSD-src-8dc847406524920db5b69acab7d3f942c5ea65d3.zip FreeBSD-src-8dc847406524920db5b69acab7d3f942c5ea65d3.tar.gz |
Merge ^/head r278005 through r278109.
Diffstat (limited to 'lib/libc')
-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; |