summaryrefslogtreecommitdiff
path: root/inet
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-11-15 04:24:42 -0500
committerUlrich Drepper <drepper@gmail.com>2011-11-15 04:24:42 -0500
commit312be3f9f5eab1643d7dcc7728c76d413d4f2640 (patch)
tree445eab9ef93914585b6625aa6ca93c24715771b7 /inet
parent82af0fa8de8201803ac670fa0de7d702ce9f0f18 (diff)
Clean up internal fopen uses
No need to ever not use c and e.
Diffstat (limited to 'inet')
-rw-r--r--inet/rcmd.c12
-rw-r--r--inet/ruserpass.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c
index 343e0954db..5e18b12691 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -149,7 +149,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
__fxprintf(NULL, "rcmd: getaddrinfo: %s\n",
gai_strerror(error));
- return -1;
+ return -1;
}
pfd[0].events = POLLIN;
@@ -488,7 +488,7 @@ iruserfopen (const char *file, uid_t okuser)
cp = _("not regular file");
else
{
- res = fopen (file, "rc");
+ res = fopen (file, "rce");
if (!res)
cp = _("cannot open");
else if (__fxstat64 (_STAT_VER, fileno (res), &st) < 0)
@@ -574,8 +574,8 @@ ruserok2_sa (ra, ralen, superuser, ruser, luser, rhost)
if (hostf != NULL)
{
- isbad = __validuser2_sa (hostf, ra, ralen, luser, ruser, rhost);
- fclose (hostf);
+ isbad = __validuser2_sa (hostf, ra, ralen, luser, ruser, rhost);
+ fclose (hostf);
}
seteuid (uid);
@@ -618,7 +618,7 @@ iruserok_af (raddr, superuser, ruser, luser, af)
case AF_INET6:
ra.ss_family = AF_INET6;
memcpy (&(((struct sockaddr_in6 *)&ra)->sin6_addr), raddr,
- sizeof(struct in6_addr));
+ sizeof(struct in6_addr));
ralen = sizeof(struct sockaddr_in6);
break;
default:
@@ -778,7 +778,7 @@ __validuser2_sa(hostf, ra, ralen, luser, ruser, rhost)
while (__getline (&buf, &bufsize, hostf) > 0) {
buf[bufsize - 1] = '\0'; /* Make sure it's terminated. */
- p = buf;
+ p = buf;
/* Skip empty or comment lines */
if (__isempty (p)) {
diff --git a/inet/ruserpass.c b/inet/ruserpass.c
index e5b2caf4dc..df423ba6ee 100644
--- a/inet/ruserpass.c
+++ b/inet/ruserpass.c
@@ -114,7 +114,7 @@ ruserpass(host, aname, apass)
buf = alloca (strlen (hdir) + 8);
__stpcpy (__stpcpy (buf, hdir), "/.netrc");
- cfile = fopen(buf, "rc");
+ cfile = fopen(buf, "rce");
if (cfile == NULL) {
if (errno != ENOENT)
warn("%s", buf);