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

Diff for /src/usr.bin/telnet/commands.c between version 1.3 and 1.4

version 1.3, 1996/03/27 19:32:58 version 1.4, 1996/04/21 23:44:11
Line 1 
Line 1 
 /*      $OpenBSD$       */  /*      $OpenBSD$       */
 /*      $NetBSD: commands.c,v 1.13 1996/02/28 21:03:53 thorpej Exp $    */  /*      $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $        */
   
 /*  /*
  * Copyright (c) 1988, 1990, 1993   * Copyright (c) 1988, 1990, 1993
Line 37 
Line 37 
 #ifndef lint  #ifndef lint
 #if 0  #if 0
 static char sccsid[] = "@(#)commands.c  8.4 (Berkeley) 5/30/95";  static char sccsid[] = "@(#)commands.c  8.4 (Berkeley) 5/30/95";
 static char rcsid[] = "$NetBSD: commands.c,v 1.13 1996/02/28 21:03:53 thorpej Exp $";  static char rcsid[] = "$NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $";
 #else  #else
 static char rcsid[] = "$OpenBSD$";  static char rcsid[] = "$OpenBSD$";
 #endif  #endif
Line 2172 
Line 2172 
         if (temp != INADDR_NONE) {          if (temp != INADDR_NONE) {
             sin.sin_addr.s_addr = temp;              sin.sin_addr.s_addr = temp;
             sin.sin_family = AF_INET;              sin.sin_family = AF_INET;
             (void) strcpy(_hostname, hostp);              host = gethostbyaddr((char *)&temp, sizeof(temp), AF_INET);
               if (host)
                   (void) strcpy(_hostname, host->h_name);
               else
                   (void) strcpy(_hostname, hostp);
             hostname = _hostname;              hostname = _hostname;
         } else {          } else {
             host = gethostbyname(hostp);              host = gethostbyname(hostp);

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