Fixed GCC-3.3.2 related compilation warnings.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 8 Nov 2003 11:10:02 +0000 (11:10 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 8 Nov 2003 11:10:02 +0000 (11:10 +0000)
12 files changed:
CHANGES
apps/silcd/command.c
apps/silcd/packet_receive.c
apps/silcd/packet_send.c
apps/silcd/server.c
apps/silcd/server_util.c
apps/silcd/serverconfig.c
apps/silcd/silcd.c
lib/silcclient/client.c
lib/silcclient/client_resume.c
lib/silcclient/idlist.c
lib/silcsftp/sftp_client.c

diff --git a/CHANGES b/CHANGES
index 0536c5a4a10b7dde2fc76c48d74f2a7881623914..3d69f46a90693575c0c055eaf1ab4dce352213c4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Sat Nov  8 13:08:53 EET 2003  Pekka Riikonen <priikone@silcnet.org>
+
+       * Fixed GCC-3.3.2 related compilation warnings from the
+         source tree.
+
 Fri Nov  7 23:01:47 EET 2003  Pekka Riikonen <priikone@silcnet.org>
 
        * Removed RC6 from distributions.
index 55f620ac0ef6d9569511d930422828507e84430b..2b24e7403091523f0a4725f4dbc3b5a08981fba5 100644 (file)
@@ -1174,7 +1174,7 @@ SILC_SERVER_CMD_FUNC(invite)
 
     /* Check if the ID is in the list already */
     silc_hash_table_list(channel->invite_list, &htl);
-    while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp2)) {
+    while (silc_hash_table_get(&htl, (void *)&type, (void *)&tmp2)) {
       if (type == 3 && !memcmp(tmp2->data, tmp, len)) {
        tmp = NULL;
        break;
@@ -1256,7 +1256,7 @@ SILC_SERVER_CMD_FUNC(invite)
                                          channel->invite_list)),
                       SILC_STR_END);
     silc_hash_table_list(channel->invite_list, &htl);
-    while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp2))
+    while (silc_hash_table_get(&htl, (void *)&type, (void *)&tmp2))
       list = silc_argument_payload_encode_one(list, tmp2->data, tmp2->len,
                                              type);
     silc_hash_table_list_reset(&htl);
@@ -2146,7 +2146,7 @@ static void silc_server_command_join_channel(SilcServer server,
                       SILC_STR_END);
 
     silc_hash_table_list(channel->invite_list, &htl);
-    while (silc_hash_table_get(&htl, (void **)&tmp_len, (void **)&reply))
+    while (silc_hash_table_get(&htl, (void *)&tmp_len, (void *)&reply))
       invite_list = silc_argument_payload_encode_one(invite_list,
                                                     reply->data,
                                                     reply->len, tmp_len);
@@ -2165,7 +2165,7 @@ static void silc_server_command_join_channel(SilcServer server,
                       SILC_STR_END);
 
     silc_hash_table_list(channel->ban_list, &htl);
-    while (silc_hash_table_get(&htl, (void **)&tmp_len, (void **)&reply))
+    while (silc_hash_table_get(&htl, (void *)&tmp_len, (void *)&reply))
       ban_list = silc_argument_payload_encode_one(ban_list,
                                                  reply->data,
                                                  reply->len, tmp_len);
@@ -3134,7 +3134,6 @@ SILC_SERVER_CMD_FUNC(cmode)
        channel->founder_key = NULL;
        goto out;
       }
-    has_founder:
     }
   } else {
     if (chl->mode & SILC_CHANNEL_UMODE_CHANFO) {
@@ -3145,6 +3144,7 @@ SILC_SERVER_CMD_FUNC(cmode)
       }
     }
   }
+ has_founder:
 
   if (mode_mask & SILC_CHANNEL_MODE_CHANNEL_AUTH) {
     if (chl->mode & SILC_CHANNEL_UMODE_CHANFO) {
@@ -3164,7 +3164,6 @@ SILC_SERVER_CMD_FUNC(cmode)
        silc_server_command_send_status_reply(cmd, SILC_COMMAND_CMODE, st, 0);
        goto out;
       }
-    has_pk_list:
     }
   } else {
     if (chl->mode & SILC_CHANNEL_UMODE_CHANFO) {
@@ -3176,6 +3175,7 @@ SILC_SERVER_CMD_FUNC(cmode)
       }
     }
   }
+ has_pk_list:
 
   /* Finally, set the mode */
   old_mask = channel->mode = mode_mask;
@@ -4108,7 +4108,7 @@ SILC_SERVER_CMD_FUNC(watch)
 
     /* Get the nickname from the watcher list and use the same key in
        new entries as well.  If key doesn't exist then create it. */
-    if (!silc_hash_table_find(server->watcher_list, hash, (void **)&tmp, NULL))
+    if (!silc_hash_table_find(server->watcher_list, hash, (void *)&tmp, NULL))
       tmp = silc_memdup(hash, CLIENTID_HASH_LEN);
 
     /* Add the client to the watcher list with the specified nickname hash. */
@@ -4130,7 +4130,7 @@ SILC_SERVER_CMD_FUNC(watch)
 
     /* Check that this client is watching for this nickname */
     if (!silc_hash_table_find_by_context(server->watcher_list, hash,
-                                        client, (void **)&tmp)) {
+                                        client, (void *)&tmp)) {
       /* Nickname is alredy being watched for this client */
       silc_server_command_send_status_data(cmd, SILC_COMMAND_WATCH,
                                           SILC_STATUS_ERR_NO_SUCH_NICK, 0,
@@ -4391,7 +4391,7 @@ SILC_SERVER_CMD_FUNC(ban)
                                          channel->ban_list)),
                       SILC_STR_END);
     silc_hash_table_list(channel->ban_list, &htl);
-    while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp2))
+    while (silc_hash_table_get(&htl, (void *)&type, (void *)&tmp2))
       list = silc_argument_payload_encode_one(list, tmp2->data, tmp2->len,
                                              type);
     silc_hash_table_list_reset(&htl);
index ec12d2d7971d67e91dfecb9fc1633f15ca4fa7c4..8b7f54c6e67ebc02dd28a4ba1d1d8e020cd32e17 100644 (file)
@@ -980,7 +980,7 @@ void silc_server_notify(SilcServer server,
        /* Get the founder of the channel and if found then this client
           cannot be the founder since there already is one. */
        silc_hash_table_list(channel->user_list, &htl);
-       while (silc_hash_table_get(&htl, NULL, (void **)&chl2))
+       while (silc_hash_table_get(&htl, NULL, (void *)&chl2))
          if (chl2->mode & SILC_CHANNEL_UMODE_CHANFO) {
            chl->mode = mode &= ~SILC_CHANNEL_UMODE_CHANFO;
            silc_server_force_cumode_change(server, sock, channel,
@@ -3877,7 +3877,7 @@ void silc_server_resume_client(SilcServer server,
        haven't resolved user list yet. */
     if (server->server_type == SILC_SERVER && !server->standalone) {
       silc_hash_table_list(client->channels, &htl);
-      while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+      while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
        channel = chl->channel;
        SILC_LOG_DEBUG(("Resolving users for %s channel",
                        channel->channel_name));
@@ -3925,7 +3925,7 @@ void silc_server_resume_client(SilcServer server,
 
     /* Send all channel keys of channels the client has joined */
     silc_hash_table_list(client->channels, &htl);
-    while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+    while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
       bool created = FALSE;
       channel = chl->channel;
 
@@ -4087,7 +4087,7 @@ void silc_server_resume_client(SilcServer server,
     /* Update channel information regarding global clients on channel. */
     if (server->server_type != SILC_ROUTER) {
       silc_hash_table_list(detached_client->channels, &htl);
-      while (silc_hash_table_get(&htl, NULL, (void **)&chl))
+      while (silc_hash_table_get(&htl, NULL, (void *)&chl))
        chl->channel->global_users =
          silc_server_channel_has_global(chl->channel);
       silc_hash_table_list_reset(&htl);
index 3d2376aef46afae59fd968edc5676361ccdbc598..8426c1135fdccbc94e8815444d4527cb30c344e2 100644 (file)
@@ -467,7 +467,7 @@ void silc_server_packet_send_clients(SilcServer server,
 
   /* Send to all clients in table */
   silc_hash_table_list(clients, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&client)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&client)) {
     /* If client has router set it is not locally connected client and
        we will route the message to the router set in the client. Though,
        send locally connected server in all cases. */
@@ -655,7 +655,7 @@ void silc_server_packet_send_to_channel(SilcServer server,
 
   /* Send the message to clients on the channel's client list. */
   silc_hash_table_list(channel->user_list, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
     client = chl->client;
     if (!client)
       continue;
@@ -871,7 +871,7 @@ void silc_server_packet_relay_to_channel(SilcServer server,
 
   /* Send the message to clients on the channel's client list. */
   silc_hash_table_list(channel->user_list, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
     client = chl->client;
     if (!client || client == sender_entry)
       continue;
@@ -1039,7 +1039,7 @@ void silc_server_packet_send_local_channel(SilcServer server,
 
   /* Send the message to clients on the channel's client list. */
   silc_hash_table_list(channel->user_list, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
     if (chl->client && SILC_IS_LOCAL(chl->client)) {
       sock = chl->client->connection;
 
@@ -1656,12 +1656,12 @@ void silc_server_send_notify_on_channels(SilcServer server,
   packetdata.src_id_type = SILC_ID_SERVER;
 
   silc_hash_table_list(client->channels, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
     channel = chl->channel;
 
     /* Send the message to all clients on the channel's client list. */
     silc_hash_table_list(channel->user_list, &htl2);
-    while (silc_hash_table_get(&htl2, NULL, (void **)&chl2)) {
+    while (silc_hash_table_get(&htl2, NULL, (void *)&chl2)) {
       c = chl2->client;
 
       if (sender && c == sender)
index 1fdaaa492d0eaf6be24909d318065021be85a9e6..4df005aa478bc84032f62983fa60a2760cb5bd94 100644 (file)
@@ -4483,7 +4483,7 @@ void silc_server_announce_get_inviteban(SilcServer server,
     type = silc_hash_table_count(channel->invite_list);
     SILC_PUT16_MSB(type, list->data);
     silc_hash_table_list(channel->invite_list, &htl);
-    while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp2))
+    while (silc_hash_table_get(&htl, (void *)&type, (void *)&tmp2))
       list = silc_argument_payload_encode_one(list, tmp2->data, tmp2->len,
                                               type);
     silc_hash_table_list_reset(&htl);
@@ -4507,7 +4507,7 @@ void silc_server_announce_get_inviteban(SilcServer server,
     type = silc_hash_table_count(channel->ban_list);
     SILC_PUT16_MSB(type, list->data);
     silc_hash_table_list(channel->ban_list, &htl);
-    while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp2))
+    while (silc_hash_table_get(&htl, (void *)&type, (void *)&tmp2))
       list = silc_argument_payload_encode_one(list, tmp2->data, tmp2->len,
                                               type);
     silc_hash_table_list_reset(&htl);
@@ -5176,7 +5176,7 @@ void silc_server_save_user_channels(SilcServer server,
      are no part of the list. */
   if (ht) {
     silc_hash_table_list(client->channels, &htl);
-    while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+    while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
       if (!silc_hash_table_find(ht, chl->channel, NULL, NULL)) {
        silc_hash_table_del(chl->channel->user_list, chl->client);
        silc_hash_table_del(chl->client->channels, chl->channel);
@@ -5187,7 +5187,7 @@ void silc_server_save_user_channels(SilcServer server,
     silc_hash_table_free(ht);
   } else {
     silc_hash_table_list(client->channels, &htl);
-    while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+    while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
       silc_hash_table_del(chl->channel->user_list, chl->client);
       silc_hash_table_del(chl->client->channels, chl->channel);
       silc_free(chl);
index 4002efa17795d0410af03f14c6f4ae846cb3c97b..d30c60cf6ab77d64d95b0fc2adf262ee19a7df9e 100644 (file)
@@ -52,7 +52,7 @@ silc_server_remove_clients_channels(SilcServer server,
   /* Remove the client from all channels. The client is removed from
      the channels' user list. */
   silc_hash_table_list(client->channels, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
     channel = chl->channel;
 
     /* Remove channel if this is last client leaving the channel, unless
@@ -101,7 +101,7 @@ silc_server_remove_clients_channels(SilcServer server,
     /* Mark other local clients to the table of clients whom will receive
        the SERVER_SIGNOFF notify. */
     silc_hash_table_list(channel->user_list, &htl2);
-    while (silc_hash_table_get(&htl2, NULL, (void **)&chl2)) {
+    while (silc_hash_table_get(&htl2, NULL, (void *)&chl2)) {
       SilcClientEntry c = chl2->client;
       if (!c)
        continue;
@@ -360,7 +360,7 @@ bool silc_server_remove_clients_by_server(SilcServer server,
      this server's client(s) on the channel. As they left the channel we
      must re-generate the channel key. */
   silc_hash_table_list(channels, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&channel)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&channel)) {
     if (!silc_server_create_channel_key(server, channel, 0)) {
       silc_hash_table_list_reset(&htl);
       silc_hash_table_free(channels);
@@ -974,7 +974,7 @@ bool silc_server_channel_has_global(SilcChannelEntry channel)
   SilcHashTableList htl;
 
   silc_hash_table_list(channel->user_list, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
     if (chl->client->router) {
       silc_hash_table_list_reset(&htl);
       return TRUE;
@@ -994,7 +994,7 @@ bool silc_server_channel_has_local(SilcChannelEntry channel)
   SilcHashTableList htl;
 
   silc_hash_table_list(channel->user_list, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chl)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chl)) {
     if (SILC_IS_LOCAL(chl->client)) {
       silc_hash_table_list_reset(&htl);
       return TRUE;
@@ -1078,7 +1078,7 @@ bool silc_server_client_on_channel(SilcClientEntry client,
     return FALSE;
 
   return silc_hash_table_find(client->channels, channel, NULL,
-                             (void **)chl);
+                             (void *)chl);
 }
 
 /* Checks string for bad characters and returns TRUE if they are found. */
@@ -1201,7 +1201,7 @@ SilcPublicKey silc_server_find_public_key(SilcServer server,
                  silc_hash_table_count(local_public_keys)));
 
   if (!silc_hash_table_find_ext(local_public_keys, remote_public_key,
-                               (void **)&cached_key, NULL,
+                               (void *)&cached_key, NULL,
                                silc_hash_public_key, NULL,
                                silc_hash_public_key_compare, NULL)) {
     SILC_LOG_ERROR(("Public key not found"));
@@ -1229,7 +1229,7 @@ SilcPublicKey silc_server_get_public_key(SilcServer server,
   assert(silc_hash_table_count(local_public_keys) < 2);
 
   silc_hash_table_list(local_public_keys, &htl);
-  if (!silc_hash_table_get(&htl, NULL, (void **)&cached_key)) {
+  if (!silc_hash_table_get(&htl, NULL, (void *)&cached_key)) {
     silc_hash_table_list_reset(&htl);
     return NULL;
   }
@@ -1756,7 +1756,7 @@ bool silc_server_del_from_watcher_list(SilcServer server,
   bool found = FALSE;
 
   silc_hash_table_list(server->watcher_list, &htl);
-  while (silc_hash_table_get(&htl, &key, (void **)&entry)) {
+  while (silc_hash_table_get(&htl, &key, (void *)&entry)) {
     if (entry == client) {
       silc_hash_table_del_by_context(server->watcher_list, key, client);
 
@@ -1868,7 +1868,7 @@ bool silc_server_inviteban_match(SilcServer server, SilcHashTable list,
 
   /* Compare the list */
   silc_hash_table_list(list, &htl);
-  while (silc_hash_table_get(&htl, (void **)&t, (void **)&entry)) {
+  while (silc_hash_table_get(&htl, (void *)&t, (void *)&entry)) {
     if (type == t) {
       if (type == 1) {
        if (silc_string_match(entry->data, tmp)) {
@@ -1975,7 +1975,7 @@ void silc_server_inviteban_process(SilcServer server, SilcHashTable list,
 
        /* Check if the public key is in the list already */
        silc_hash_table_list(list, &htl);
-       while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp2)) {
+       while (silc_hash_table_get(&htl, (void *)&type, (void *)&tmp2)) {
          if (type == 2 && !memcmp(tmp2->data, tmp, len)) {
            tmp = NULL;
            break;
@@ -1995,7 +1995,7 @@ void silc_server_inviteban_process(SilcServer server, SilcHashTable list,
 
        /* Check if the ID is in the list already */
        silc_hash_table_list(list, &htl);
-       while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp2)) {
+       while (silc_hash_table_get(&htl, (void *)&type, (void *)&tmp2)) {
          if (type == 3 && !memcmp(tmp2->data, tmp, len)) {
            tmp = NULL;
            break;
@@ -2025,7 +2025,7 @@ void silc_server_inviteban_process(SilcServer server, SilcHashTable list,
           the requested string. */
        char *string = NULL, *start, *end, *n;
 
-       if (silc_hash_table_find(list, (void *)1, NULL, (void **)&tmp2)) {
+       if (silc_hash_table_find(list, (void *)1, NULL, (void *)&tmp2)) {
          string = tmp2->head;
          if (tmp2->truelen && !strncmp(string, tmp, tmp2->truelen - 1)) {
            /* Delete entire string */
@@ -2050,7 +2050,7 @@ void silc_server_inviteban_process(SilcServer server, SilcHashTable list,
 
        /* Delete from the invite list */
        silc_hash_table_list(list, &htl);
-       while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp2)) {
+       while (silc_hash_table_get(&htl, (void *)&type, (void *)&tmp2)) {
          if (type == 2 && !memcmp(tmp2->data, tmp, len)) {
            silc_hash_table_del_by_context(list, (void *)2, tmp2);
            break;
@@ -2063,7 +2063,7 @@ void silc_server_inviteban_process(SilcServer server, SilcHashTable list,
 
        /* Delete from the invite list */
        silc_hash_table_list(list, &htl);
-       while (silc_hash_table_get(&htl, (void **)&type, (void **)&tmp2)) {
+       while (silc_hash_table_get(&htl, (void *)&type, (void *)&tmp2)) {
          if (type == 3 && !memcmp(tmp2->data, tmp, len)) {
            silc_hash_table_del_by_context(list, (void *)3, tmp2);
            break;
@@ -2191,7 +2191,7 @@ SilcBuffer silc_server_get_channel_pk_list(SilcServer server,
                     SILC_STR_END);
 
   silc_hash_table_list(channel->channel_pubkeys, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&pk)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&pk)) {
     pkp = silc_pkcs_public_key_payload_encode(pk);
     list = silc_argument_payload_encode_one(list, pkp->data, pkp->len,
                                            announce ? 0x03 :
@@ -2318,7 +2318,7 @@ bool silc_server_verify_channel_auth(SilcServer server,
 
   /* Find the public key with the hash */
   if (!silc_hash_table_find(channel->channel_pubkeys, pkhash,
-                           NULL, (void **)&chpk)) {
+                           NULL, (void *)&chpk)) {
     SILC_LOG_DEBUG(("Public key not found in channel public key list"));
     goto out;
   }
index a60c6475e511818f37eee4f1dccbe4f2e6e394db..830ea5a64a164267caa7c22cec3c07d086082b22 100644 (file)
@@ -149,7 +149,7 @@ static bool my_parse_authdata(SilcAuthMethod auth_meth, const char *p,
       }
 
     if (*auth_data &&
-       silc_hash_table_find_ext(*auth_data, public_key, (void **)&cached_key,
+       silc_hash_table_find_ext(*auth_data, public_key, (void *)&cached_key,
                                 NULL, silc_hash_public_key, NULL,
                                 silc_hash_public_key_compare, NULL)) {
       silc_pkcs_public_key_free(public_key);
@@ -831,7 +831,7 @@ SILC_CONFIG_CALLBACK(fetch_client)
   else if (!strcmp(name, "passphrase")) {
     CONFIG_IS_DOUBLE(tmp->passphrase);
     if (!my_parse_authdata(SILC_AUTH_PASSWORD, (char *) val,
-                          (void **)&tmp->passphrase,
+                          (void *)&tmp->passphrase,
                           &tmp->passphrase_len)) {
       got_errno = SILC_CONFIG_EPRINTLINE;
       goto got_err;
@@ -839,13 +839,13 @@ SILC_CONFIG_CALLBACK(fetch_client)
   }
   else if (!strcmp(name, "publickey")) {
     if (!my_parse_authdata(SILC_AUTH_PUBLIC_KEY, (char *) val,
-                          (void **)&tmp->publickeys, NULL)) {
+                          (void *)&tmp->publickeys, NULL)) {
       got_errno = SILC_CONFIG_EPRINTLINE;
       goto got_err;
     }
   }
   else if (!strcmp(name, "publickeydir")) {
-    if (!my_parse_publickeydir((char *) val, (void **)&tmp->publickeys)) {
+    if (!my_parse_publickeydir((char *) val, (void *)&tmp->publickeys)) {
       got_errno = SILC_CONFIG_EPRINTLINE;
       goto got_err;
     }
@@ -903,7 +903,7 @@ SILC_CONFIG_CALLBACK(fetch_admin)
   else if (!strcmp(name, "passphrase")) {
     CONFIG_IS_DOUBLE(tmp->passphrase);
     if (!my_parse_authdata(SILC_AUTH_PASSWORD, (char *) val,
-                          (void **)&tmp->passphrase,
+                          (void *)&tmp->passphrase,
                           &tmp->passphrase_len)) {
       got_errno = SILC_CONFIG_EPRINTLINE;
       goto got_err;
@@ -911,13 +911,13 @@ SILC_CONFIG_CALLBACK(fetch_admin)
   }
   else if (!strcmp(name, "publickey")) {
     if (!my_parse_authdata(SILC_AUTH_PUBLIC_KEY, (char *) val,
-                          (void **)&tmp->publickeys, NULL)) {
+                          (void *)&tmp->publickeys, NULL)) {
       got_errno = SILC_CONFIG_EPRINTLINE;
       goto got_err;
     }
   }
   else if (!strcmp(name, "publickeydir")) {
-    if (!my_parse_publickeydir((char *) val, (void **)&tmp->publickeys)) {
+    if (!my_parse_publickeydir((char *) val, (void *)&tmp->publickeys)) {
       got_errno = SILC_CONFIG_EPRINTLINE;
       goto got_err;
     }
@@ -1008,7 +1008,7 @@ SILC_CONFIG_CALLBACK(fetch_server)
   else if (!strcmp(name, "passphrase")) {
     CONFIG_IS_DOUBLE(tmp->passphrase);
     if (!my_parse_authdata(SILC_AUTH_PASSWORD, (char *) val,
-                          (void **)&tmp->passphrase,
+                          (void *)&tmp->passphrase,
                           &tmp->passphrase_len)) {
       got_errno = SILC_CONFIG_EPRINTLINE;
       goto got_err;
@@ -1017,7 +1017,7 @@ SILC_CONFIG_CALLBACK(fetch_server)
   else if (!strcmp(name, "publickey")) {
     CONFIG_IS_DOUBLE(tmp->publickeys);
     if (!my_parse_authdata(SILC_AUTH_PUBLIC_KEY, (char *) val,
-                          (void **)&tmp->publickeys, NULL)) {
+                          (void *)&tmp->publickeys, NULL)) {
       got_errno = SILC_CONFIG_EPRINTLINE;
       goto got_err;
     }
@@ -1084,7 +1084,7 @@ SILC_CONFIG_CALLBACK(fetch_router)
   else if (!strcmp(name, "passphrase")) {
     CONFIG_IS_DOUBLE(tmp->passphrase);
     if (!my_parse_authdata(SILC_AUTH_PASSWORD, (char *) val,
-                          (void **)&tmp->passphrase,
+                          (void *)&tmp->passphrase,
                           &tmp->passphrase_len)) {
       got_errno = SILC_CONFIG_EPRINTLINE;
       goto got_err;
@@ -1093,7 +1093,7 @@ SILC_CONFIG_CALLBACK(fetch_router)
   else if (!strcmp(name, "publickey")) {
     CONFIG_IS_DOUBLE(tmp->publickeys);
     if (!my_parse_authdata(SILC_AUTH_PUBLIC_KEY, (char *) val,
-                          (void **)&tmp->publickeys, NULL)) {
+                          (void *)&tmp->publickeys, NULL)) {
       got_errno = SILC_CONFIG_EPRINTLINE;
       goto got_err;
     }
index 9e2c2a16b0ee5b161d4ad675fd13d5f41f3933b4..81f5cdf4296bee65f93a911f4304a5e3d2fdcf57 100644 (file)
@@ -461,6 +461,8 @@ SILC_TASK_CALLBACK(dump_stats)
   fclose(fdd);
 }
 
+#ifdef SILC_DEBUG
+
 typedef struct {
   int level;
   const char *string;
@@ -540,6 +542,7 @@ static void silc_get_debug_level(int level)
       break;
     }
 }
+#endif /* SILC_DEBUG */
 
 /* This function should not be called directly but through the appropriate
    wrapper macro defined in server.h */
index 0e7fe71b579c139bc199ac27e9ffe398c31b7713..7c3a0291b74fa33f5396936da48494d5a9a04e37 100644 (file)
@@ -1812,7 +1812,7 @@ void silc_client_remove_from_channels(SilcClient client,
   SilcChannelUser chu;
 
   silc_hash_table_list(client_entry->channels, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chu)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chu)) {
     silc_hash_table_del(chu->client->channels, chu->channel);
     silc_hash_table_del(chu->channel->user_list, chu->client);
     silc_free(chu);
@@ -1835,7 +1835,7 @@ void silc_client_replace_from_channels(SilcClient client,
   SilcChannelUser chu;
 
   silc_hash_table_list(old->channels, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chu)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chu)) {
     /* Replace client entry */
     silc_hash_table_del(chu->client->channels, chu->channel);
     silc_hash_table_del(chu->channel->user_list, chu->client);
index 3efe64ad2c2c6b59d6df4685ee27aa1bd7b91cac..54df971f27d73ed1e8f9abb37f880f36b6429c84 100644 (file)
@@ -67,7 +67,7 @@ SilcBuffer silc_client_get_detach_data(SilcClient client,
 
   /* Save all joined channels */
   silc_hash_table_list(conn->local_entry->channels, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chu)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chu)) {
     unsigned char *chid = silc_id_id2str(chu->channel->id, SILC_ID_CHANNEL);
     SilcUInt16 chid_len = silc_id_get_len(chu->channel->id, SILC_ID_CHANNEL);
 
index 17f3823e0c8da254569ccd751390546780b33c99..07bead3afc3e3c1c430d89272dd87136738ce97d 100644 (file)
@@ -522,7 +522,7 @@ SILC_CLIENT_CMD_FUNC(get_clients_by_channel_cb)
     clients = silc_calloc(silc_hash_table_count(channel->user_list),
                          sizeof(*clients));
     silc_hash_table_list(channel->user_list, &htl);
-    while (silc_hash_table_get(&htl, NULL, (void **)&chu))
+    while (silc_hash_table_get(&htl, NULL, (void *)&chu))
       clients[clients_count++] = chu->client;
     silc_hash_table_list_reset(&htl);
     found = TRUE;
@@ -583,7 +583,7 @@ void silc_client_get_clients_by_channel(SilcClient client,
   }
 
   silc_hash_table_list(channel->user_list, &htl);
-  while (silc_hash_table_get(&htl, NULL, (void **)&chu)) {
+  while (silc_hash_table_get(&htl, NULL, (void *)&chu)) {
     entry = chu->client;
 
     /* If the entry has incomplete info, then resolve it from the server. */
index 708885ba87495c41cf0de1e5fe5bafd78bb01296..1b198b860f689488be8b7544deb01fb1f37d786c 100644 (file)
@@ -1,10 +1,10 @@
 /*
 
-  sftp_client.c 
+  sftp_client.c
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2001 Pekka Riikonen
+  Copyright (C) 2001 2003 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -84,7 +84,7 @@ static void silc_sftp_handle_delete(SilcSFTPHandle handle)
 
 /* Returns the handle data of the `handle' to the `data' pointer. */
 
-static void silc_sftp_handle_get(SilcSFTPHandle handle, 
+static void silc_sftp_handle_get(SilcSFTPHandle handle,
                                 const unsigned char **data,
                                 SilcUInt32 *data_len)
 {
@@ -95,7 +95,7 @@ static void silc_sftp_handle_get(SilcSFTPHandle handle,
 /* General routine to send SFTP packet to the SFTP server. */
 
 static void silc_sftp_send_packet(SilcSFTPClient sftp,
-                                 SilcSFTPPacket type, 
+                                 SilcSFTPPacket type,
                                  SilcUInt32 len, ...)
 {
   SilcBuffer tmp;
@@ -108,7 +108,7 @@ static void silc_sftp_send_packet(SilcSFTPClient sftp,
     return;
   sftp->packet = tmp;
 
-  SILC_LOG_HEXDUMP(("SFTP packet to server"), sftp->packet->data, 
+  SILC_LOG_HEXDUMP(("SFTP packet to server"), sftp->packet->data,
                   sftp->packet->len);
 
   /* Send the packet */
@@ -143,8 +143,8 @@ static SilcSFTPRequest silc_sftp_find_request(SilcSFTPClient sftp, SilcUInt32 id
    operation. The variable argument list includes the status and req->type
    specific data. */
 
-static void silc_sftp_call_request(SilcSFTPClient sftp, 
-                                  SilcSFTPRequest req, 
+static void silc_sftp_call_request(SilcSFTPClient sftp,
+                                  SilcSFTPRequest req,
                                   SilcSFTPPacket type,
                                   SilcSFTPStatus status, ...)
 {
@@ -171,9 +171,9 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
       data_len = (SilcUInt32)va_arg(vp, SilcUInt32);
 
       if (req->data)
-       (*req->data)((SilcSFTP)sftp, status, (const unsigned char *)data, 
+       (*req->data)((SilcSFTP)sftp, status, (const unsigned char *)data,
                     data_len, req->context);
-    }    
+    }
     break;
 
   case SILC_SFTP_OPEN:
@@ -221,7 +221,7 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
       language_tag = (char *)va_arg(vp, char *);
 
       if (req->status)
-       (*req->status)((SilcSFTP)sftp, status, (const char *)message, 
+       (*req->status)((SilcSFTP)sftp, status, (const char *)message,
                       (const char *)language_tag, req->context);
     }
     break;
@@ -242,7 +242,7 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
       attr = (SilcSFTPAttributes)va_arg(vp, SilcSFTPAttributes);
 
       if (req->attr)
-       (*req->attr)((SilcSFTP)sftp, status, (const SilcSFTPAttributes)attr, 
+       (*req->attr)((SilcSFTP)sftp, status, (const SilcSFTPAttributes)attr,
                     req->context);
     }
     break;
@@ -283,7 +283,7 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
       data_len = (SilcUInt32)va_arg(vp, SilcUInt32);
 
       if (req->extended)
-       (*req->extended)((SilcSFTP)sftp, status, (const unsigned char *)data, 
+       (*req->extended)((SilcSFTP)sftp, status, (const unsigned char *)data,
                         data_len, req->context);
     }
     break;
@@ -302,7 +302,7 @@ static void silc_sftp_call_request(SilcSFTPClient sftp,
 /* Starts SFTP client and returns context for it.  The version callback
    indicated by the `callback' will be called after the SFTP session has
    been started and server has returned the version of the protocol.  The
-   SFTP client context is returned in the callback too.  This returns 
+   SFTP client context is returned in the callback too.  This returns
    allocated SFTP client context or NULL on error. */
 
 SilcSFTP silc_sftp_client_start(SilcSFTPSendPacketCallback send_packet,
@@ -325,7 +325,7 @@ SilcSFTP silc_sftp_client_start(SilcSFTPSendPacketCallback send_packet,
   silc_list_init(sftp->requests, struct SilcSFTPRequestStruct, next);
 
   /* Send the SFTP session initialization to the server */
-  silc_sftp_send_packet(sftp, SILC_SFTP_INIT, 4, 
+  silc_sftp_send_packet(sftp, SILC_SFTP_INIT, 4,
                        SILC_STR_UI_INT(SILC_SFTP_PROTOCOL_VERSION),
                        SILC_STR_END);
 
@@ -365,7 +365,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
   SILC_LOG_DEBUG(("Start"));
 
   /* Parse the packet */
-  type = silc_sftp_packet_decode(packet->buffer, (unsigned char **)&payload, 
+  type = silc_sftp_packet_decode(packet->buffer, (unsigned char **)&payload,
                                 &payload_len);
   if (!type)
     return;
@@ -383,13 +383,13 @@ void silc_sftp_client_receive_process(SilcSFTP context,
                                 SILC_STR_UI_INT(&version),
                                 SILC_STR_END);
       if (ret < 0) {
-       (*sftp->version)((SilcSFTP)sftp, SILC_SFTP_STATUS_FAILURE, 0, 
+       (*sftp->version)((SilcSFTP)sftp, SILC_SFTP_STATUS_FAILURE, 0,
                         sftp->version_context);
        break;
       }
 
       /* Call the callback */
-      (*sftp->version)((SilcSFTP)sftp, SILC_SFTP_STATUS_OK, version, 
+      (*sftp->version)((SilcSFTP)sftp, SILC_SFTP_STATUS_OK, version,
                       sftp->version_context);
     }
     break;
@@ -401,7 +401,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
 
       SILC_LOG_DEBUG(("Status packet"));
 
-      ret = silc_buffer_unformat(&buf, 
+      ret = silc_buffer_unformat(&buf,
                                 SILC_STR_UI_INT(&id),
                                 SILC_STR_UI_INT(&status),
                                 SILC_STR_END);
@@ -443,9 +443,9 @@ void silc_sftp_client_receive_process(SilcSFTP context,
 
       SILC_LOG_DEBUG(("Handle packet"));
 
-      ret = silc_buffer_unformat(&buf, 
+      ret = silc_buffer_unformat(&buf,
                                 SILC_STR_UI_INT(&id),
-                                SILC_STR_UI32_NSTRING(&handle, 
+                                SILC_STR_UI32_NSTRING(&handle,
                                                       &handle_len),
                                 SILC_STR_END);
       if (ret < 0)
@@ -457,7 +457,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
        break;
 
       /* Call the callback */
-      silc_sftp_call_request(sftp, req, type, SILC_SFTP_STATUS_OK, 
+      silc_sftp_call_request(sftp, req, type, SILC_SFTP_STATUS_OK,
                             handle, handle_len);
     }
     break;
@@ -469,7 +469,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
 
       SILC_LOG_DEBUG(("Data packet"));
 
-      ret = silc_buffer_unformat(&buf, 
+      ret = silc_buffer_unformat(&buf,
                                 SILC_STR_UI_INT(&id),
                                 SILC_STR_UI32_NSTRING(&data, &data_len),
                                 SILC_STR_END);
@@ -482,7 +482,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
        break;
 
       /* Call the callback */
-      silc_sftp_call_request(sftp, req, type, SILC_SFTP_STATUS_OK, 
+      silc_sftp_call_request(sftp, req, type, SILC_SFTP_STATUS_OK,
                             data, data_len);
     }
     break;
@@ -494,7 +494,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
 
       SILC_LOG_DEBUG(("Name packet"));
 
-      ret = silc_buffer_unformat(&buf, 
+      ret = silc_buffer_unformat(&buf,
                                 SILC_STR_UI_INT(&id),
                                 SILC_STR_UI_INT(&count),
                                 SILC_STR_END);
@@ -526,7 +526,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
 
       SILC_LOG_DEBUG(("Attributes packet"));
 
-      ret = silc_buffer_unformat(&buf, 
+      ret = silc_buffer_unformat(&buf,
                                 SILC_STR_UI_INT(&id),
                                 SILC_STR_UI_XNSTRING(&data, buf.len - 4),
                                 SILC_STR_END);
@@ -554,7 +554,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
 
       SILC_LOG_DEBUG(("Extended reply packet"));
 
-      ret = silc_buffer_unformat(&buf, 
+      ret = silc_buffer_unformat(&buf,
                                 SILC_STR_UI_INT(&id),
                                 SILC_STR_UI_XNSTRING(&data, buf.len - 4),
                                 SILC_STR_END);
@@ -567,7 +567,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
        break;
 
       /* Call the callback */
-      silc_sftp_call_request(sftp, req, type, SILC_SFTP_STATUS_OK, 
+      silc_sftp_call_request(sftp, req, type, SILC_SFTP_STATUS_OK,
                             data, buf.len - 4);
     }
     break;
@@ -577,7 +577,7 @@ void silc_sftp_client_receive_process(SilcSFTP context,
   }
 }
 
-void silc_sftp_open(SilcSFTP sftp, 
+void silc_sftp_open(SilcSFTP sftp,
                    const char *filename,
                    SilcSFTPFileOperation pflags,
                    SilcSFTPAttributes attrs,
@@ -605,12 +605,12 @@ void silc_sftp_open(SilcSFTP sftp,
     return;
   len = 4 + 4 + strlen(filename) + 4 + attrs_buf->len;
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(filename)),
                        SILC_STR_UI32_STRING(filename),
                        SILC_STR_UI_INT(pflags),
-                       SILC_STR_UI_XNSTRING(attrs_buf->data, 
+                       SILC_STR_UI_XNSTRING(attrs_buf->data,
                                             attrs_buf->len),
                        SILC_STR_END);
 
@@ -642,16 +642,17 @@ void silc_sftp_close(SilcSFTP sftp,
   silc_sftp_handle_get(handle, &hdata, &hdata_len);
   len = 4 + 4 + hdata_len;
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(hdata_len),
                        SILC_STR_UI_XNSTRING(hdata, hdata_len),
                        SILC_STR_END);
+  silc_sftp_handle_delete(handle);
 }
 
 void silc_sftp_read(SilcSFTP sftp,
                    SilcSFTPHandle handle,
-                   SilcUInt64 offset, 
+                   SilcUInt64 offset,
                    SilcUInt32 len,
                    SilcSFTPDataCallback callback,
                    void *context)
@@ -676,7 +677,7 @@ void silc_sftp_read(SilcSFTP sftp,
   silc_sftp_handle_get(handle, &hdata, &hdata_len);
   len2 = 4 + 4 + hdata_len + 8 + 4;
 
-  silc_sftp_send_packet(client, req->type, len2, 
+  silc_sftp_send_packet(client, req->type, len2,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(hdata_len),
                        SILC_STR_UI_XNSTRING(hdata, hdata_len),
@@ -713,7 +714,7 @@ void silc_sftp_write(SilcSFTP sftp,
   silc_sftp_handle_get(handle, &hdata, &hdata_len);
   len = 4 + 4 + hdata_len + 8 + 4 + data_len;
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(hdata_len),
                        SILC_STR_UI_XNSTRING(hdata, hdata_len),
@@ -745,7 +746,7 @@ void silc_sftp_remove(SilcSFTP sftp,
 
   len = 4 + 4 + strlen(filename);
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(filename)),
                        SILC_STR_UI32_STRING(filename),
@@ -775,7 +776,7 @@ void silc_sftp_rename(SilcSFTP sftp,
 
   len = 4 + 4 + strlen(oldname) + 4 + strlen(newname);
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(oldname)),
                        SILC_STR_UI32_STRING(oldname),
@@ -811,7 +812,7 @@ void silc_sftp_mkdir(SilcSFTP sftp,
     return;
   len = 4 + 4 + strlen(path) + attrs_buf->len;
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(path)),
                        SILC_STR_UI32_STRING(path),
@@ -844,7 +845,7 @@ void silc_sftp_rmdir(SilcSFTP sftp,
 
   len = 4 + 4 + strlen(path);
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(path)),
                        SILC_STR_UI32_STRING(path),
@@ -873,7 +874,7 @@ void silc_sftp_opendir(SilcSFTP sftp,
 
   len = 4 + 4 + strlen(path);
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(path)),
                        SILC_STR_UI32_STRING(path),
@@ -905,7 +906,7 @@ void silc_sftp_readdir(SilcSFTP sftp,
   silc_sftp_handle_get(handle, &hdata, &hdata_len);
   len = 4 + 4 + hdata_len;
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(hdata_len),
                        SILC_STR_UI_XNSTRING(hdata, hdata_len),
@@ -934,7 +935,7 @@ void silc_sftp_stat(SilcSFTP sftp,
 
   len = 4 + 4 + strlen(path);
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(path)),
                        SILC_STR_UI32_STRING(path),
@@ -963,7 +964,7 @@ void silc_sftp_lstat(SilcSFTP sftp,
 
   len = 4 + 4 + strlen(path);
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(path)),
                        SILC_STR_UI32_STRING(path),
@@ -995,7 +996,7 @@ void silc_sftp_fstat(SilcSFTP sftp,
   silc_sftp_handle_get(handle, &hdata, &hdata_len);
   len = 4 + 4 + hdata_len;
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(hdata_len),
                        SILC_STR_UI_XNSTRING(hdata, hdata_len),
@@ -1029,7 +1030,7 @@ void silc_sftp_setstat(SilcSFTP sftp,
     return;
   len = 4 + 4 + strlen(path) + attrs_buf->len;
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(path)),
                        SILC_STR_UI32_STRING(path),
@@ -1070,7 +1071,7 @@ void silc_sftp_fsetstat(SilcSFTP sftp,
     return;
   len = 4 + 4 + hdata_len + attrs_buf->len;
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(hdata_len),
                        SILC_STR_UI_XNSTRING(hdata, hdata_len),
@@ -1103,7 +1104,7 @@ void silc_sftp_readlink(SilcSFTP sftp,
 
   len = 4 + 4 + strlen(path);
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(path)),
                        SILC_STR_UI32_STRING(path),
@@ -1133,7 +1134,7 @@ void silc_sftp_symlink(SilcSFTP sftp,
 
   len = 4 + 4 + strlen(linkpath) + 4 + strlen(targetpath);
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(linkpath)),
                        SILC_STR_UI32_STRING(linkpath),
@@ -1164,7 +1165,7 @@ void silc_sftp_realpath(SilcSFTP sftp,
 
   len = 4 + 4 + strlen(path);
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(path)),
                        SILC_STR_UI32_STRING(path),
@@ -1195,7 +1196,7 @@ void silc_sftp_extended(SilcSFTP sftp,
 
   len = 4 + 4 + strlen(request) + data_len;
 
-  silc_sftp_send_packet(client, req->type, len, 
+  silc_sftp_send_packet(client, req->type, len,
                        SILC_STR_UI_INT(req->id),
                        SILC_STR_UI_INT(strlen(request)),
                        SILC_STR_UI32_STRING(request),