[BACK]Return to ssh-keyscan.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh-keyscan.c between version 1.101 and 1.102

version 1.101, 2015/04/10 00:08:55 version 1.102, 2015/10/24 22:56:19
Line 276 
Line 276 
 }  }
   
 static void  static void
 keyprint(con *c, struct sshkey *key)  keyprint_one(char *host, struct sshkey *key)
 {  {
         char *host = c->c_output_name ? c->c_output_name : c->c_name;          char *hostport;
         char *hostport = NULL;  
   
         if (!key)  
                 return;  
         if (hash_hosts && (host = host_hash(host, NULL, 0)) == NULL)          if (hash_hosts && (host = host_hash(host, NULL, 0)) == NULL)
                 fatal("host_hash failed");                  fatal("host_hash failed");
   
Line 291 
Line 288 
         sshkey_write(key, stdout);          sshkey_write(key, stdout);
         fputs("\n", stdout);          fputs("\n", stdout);
         free(hostport);          free(hostport);
   }
   
   static void
   keyprint(con *c, struct sshkey *key)
   {
           char *hosts = c->c_output_name ? c->c_output_name : c->c_name;
           char *host, *ohosts;
   
           if (key == NULL)
                   return;
           if (!hash_hosts && ssh_port == SSH_DEFAULT_PORT) {
                   keyprint_one(hosts, key);
                   return;
           }
           ohosts = hosts = xstrdup(hosts);
           while ((host = strsep(&hosts, ",")) != NULL)
                   keyprint_one(host, key);
           free(ohosts);
 }  }
   
 static int  static int

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102