[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.132 and 1.133

version 1.132, 2018/10/03 06:38:35 version 1.133, 2018/10/05 14:26:09
Line 36 
Line 36 
 #include <netinet/in.h>  #include <netinet/in.h>
 #include <netinet/ip.h>  #include <netinet/ip.h>
 #include <netinet/tcp.h>  #include <netinet/tcp.h>
   #include <arpa/inet.h>
   
 #include <ctype.h>  #include <ctype.h>
 #include <errno.h>  #include <errno.h>
Line 299 
Line 300 
 int  int
 a2port(const char *s)  a2port(const char *s)
 {  {
           struct servent *se;
         long long port;          long long port;
         const char *errstr;          const char *errstr;
   
         port = strtonum(s, 0, 65535, &errstr);          port = strtonum(s, 0, 65535, &errstr);
         if (errstr != NULL)          if (errstr == NULL)
                 return -1;                  return (int)port;
         return (int)port;          if ((se = getservbyname(s, "tcp")) != NULL)
                   return ntohs(se->s_port);
           return -1;
 }  }
   
 int  int

Legend:
Removed from v.1.132  
changed lines
  Added in v.1.133