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

Diff for /src/usr.bin/ssh/misc.c between version 1.55 and 1.56

version 1.55, 2006/07/09 15:15:10 version 1.56, 2006/07/10 12:46:51
Line 41 
Line 41 
 #include "misc.h"  #include "misc.h"
 #include "log.h"  #include "log.h"
 #include "xmalloc.h"  #include "xmalloc.h"
   #include "ssh.h"
   
 /* remove newline at end of string */  /* remove newline at end of string */
 char *  char *
Line 324 
Line 325 
         }          }
   
         return total;          return total;
   }
   
   /*
    * Returns a standardized host+port identifier string.
    * Caller must free returned string.
    */
   char *
   put_host_port(const char *host, u_short port)
   {
           char *hoststr;
   
           if (port == 0 || port == SSH_DEFAULT_PORT)
                   return(xstrdup(host));
           if (asprintf(&hoststr, "[%s]:%d", host, (int)port) < 0)
                   fatal("put_host_port: asprintf: %s", strerror(errno));
           debug3("put_host_port: %s", hoststr);
           return hoststr;
 }  }
   
 /*  /*

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56