diff lib/sshv2.c @ 531:65cd664cbf32

2004-8-17 Brian Masney <masneyb@gftp.org> * lib/rfc959.c lib/sshv2.c - removed unneeded code in the *_chmod() functions
author masneyb
date Wed, 18 Aug 2004 00:56:58 +0000
parents c36a475ecf5a
children c568539856d2
line wrap: on
line diff
--- a/lib/sshv2.c	Fri Aug 13 19:46:21 2004 +0000
+++ b/lib/sshv2.c	Wed Aug 18 00:56:58 2004 +0000
@@ -1481,7 +1481,7 @@
 static int 
 sshv2_chmod (gftp_request * request, const char *file, mode_t mode)
 {
-  char *tempstr, *endpos, buf[10];
+  char *tempstr, *endpos;
   sshv2_message message;
   guint32 num;
   size_t len;
@@ -1497,8 +1497,7 @@
   num = htonl (SSH_FILEXFER_ATTR_PERMISSIONS);
   memcpy (endpos, &num, 4);
 
-  g_snprintf (buf, sizeof (buf), "%o", mode);
-  num = htonl (strtol (buf, NULL, 8));
+  num = htonl (mode);
   memcpy (endpos + 4, &num, 4);
 
   ret = sshv2_send_command (request, SSH_FXP_SETSTAT, tempstr, len);