]> Dogcows Code - chaz/tar/blobdiff - src/rtapelib.c
Removed unused variables
[chaz/tar] / src / rtapelib.c
index 772f208528d6eaa55c141097effcf651b685eda8..1e044295fad810b3c327d0264c917eef2ba59b2a 100644 (file)
@@ -251,8 +251,6 @@ get_status_off (int handle)
 
 #if WITH_REXEC
 
-int rexec ();
-
 /* Execute /etc/rmt as user USER on remote system HOST using rexec.
    Return a file descriptor of a bidirectional socket for stdin and
    stdout.  If USER is zero, use the current username.
@@ -484,10 +482,7 @@ rmt_open__ (const char *path, int open_mode, int bias, const char *remote_shell)
        close (from_remote[remote_pipe_number][PREAD]);
        close (from_remote[remote_pipe_number][PWRITE]);
 
-#if !MSDOS
-       setuid (getuid ());
-       setgid (getgid ());
-#endif
+       sys_reset_uid_gid ();
 
        if (remote_user)
          execl (remote_shell, remote_shell_basename, remote_host,
@@ -610,6 +605,7 @@ rmt_lseek__ (int handle, off_t offset, int whence)
   uintmax_t u = offset < 0 ? - (uintmax_t) offset : (uintmax_t) offset;
   char *p = operand_buffer + sizeof operand_buffer;
 
+  *--p = 0;
   do
     *--p = '0' + (int) (u % 10);
   while ((u /= 10) != 0);
@@ -653,6 +649,7 @@ rmt_ioctl__ (int handle, int operation, char *argument)
                       : (uintmax_t) ((struct mtop *) argument)->mt_count);
        char *p = operand_buffer + sizeof operand_buffer;
        
+        *--p = 0;
        do
          *--p = '0' + (int) (u % 10);
        while ((u /= 10) != 0);
This page took 0.02106 seconds and 4 git commands to generate.