Browse Source

sync iruserfopen() prototype with glibc and remove double setting of cp to NULL by Bernard Fischer

Mike Frysinger 19 years ago
parent
commit
f96e8c2c89
1 changed files with 1 additions and 2 deletions
  1. 1 2
      libc/inet/rpc/rcmd.c

+ 1 - 2
libc/inet/rpc/rcmd.c

@@ -433,7 +433,7 @@ int ruserok(rhost, superuser, ruser, luser)
 
 
 /* Extremely paranoid file open function. */
 /* Extremely paranoid file open function. */
 static FILE *
 static FILE *
-iruserfopen (char *file, uid_t okuser)
+iruserfopen (const char *file, uid_t okuser)
 {
 {
   struct stat st;
   struct stat st;
   char *cp = NULL;
   char *cp = NULL;
@@ -442,7 +442,6 @@ iruserfopen (char *file, uid_t okuser)
   /* If not a regular file, if owned by someone other than user or
   /* If not a regular file, if owned by someone other than user or
      root, if writeable by anyone but the owner, or if hardlinked
      root, if writeable by anyone but the owner, or if hardlinked
      anywhere, quit.  */
      anywhere, quit.  */
-  cp = NULL;
   if (lstat (file, &st))
   if (lstat (file, &st))
     cp = "lstat failed";
     cp = "lstat failed";
   else if (!S_ISREG (st.st_mode))
   else if (!S_ISREG (st.st_mode))