diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-11-15 04:24:42 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-11-15 04:24:42 -0500 |
commit | 312be3f9f5eab1643d7dcc7728c76d413d4f2640 (patch) | |
tree | 445eab9ef93914585b6625aa6ca93c24715771b7 /inet/rcmd.c | |
parent | 82af0fa8de8201803ac670fa0de7d702ce9f0f18 (diff) | |
download | glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.zip glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.gz glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.bz2 |
Clean up internal fopen uses
No need to ever not use c and e.
Diffstat (limited to 'inet/rcmd.c')
-rw-r--r-- | inet/rcmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c index 343e095..5e18b12 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)) { |