[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.4 and 1.5

version 1.4, 2001/02/28 17:52:54 version 1.5, 2001/04/12 20:09:37
Line 113 
Line 113 
         copy->pw_shell = xstrdup(pw->pw_shell);          copy->pw_shell = xstrdup(pw->pw_shell);
         return copy;          return copy;
 }  }
   
   int a2port(const char *s)
   {
           long port;
           char *endp;
   
           errno = 0;
           port = strtol(s, &endp, 0);
           if (s == endp || *endp != '\0' ||
               (errno == ERANGE && (port == LONG_MIN || port == LONG_MAX)) ||
               port <= 0 || port > 65535)
                   return 0;
   
           return port;
   }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5