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

Diff for /src/usr.bin/talk/get_addrs.c between version 1.8 and 1.9

version 1.8, 2009/10/27 23:59:44 version 1.9, 2010/08/12 23:31:29
Line 37 
Line 37 
 #include "talk_ctl.h"  #include "talk_ctl.h"
   
 void  void
 get_addrs(my_machine_name, his_machine_name)  get_addrs(char *my_machine_name, char *his_machine_name)
         char *my_machine_name, *his_machine_name;  
 {  {
         struct hostent *hp;          struct hostent *hp;
         struct servent *sp;          struct servent *sp;
Line 48 
Line 47 
         hp = gethostbyname(my_machine_name);          hp = gethostbyname(my_machine_name);
         if (hp == NULL)          if (hp == NULL)
                 errx(1, "%s: %s", my_machine_name, hstrerror(h_errno));                  errx(1, "%s: %s", my_machine_name, hstrerror(h_errno));
         bcopy(hp->h_addr, (char *)&my_machine_addr, hp->h_length);          bcopy(hp->h_addr, &my_machine_addr, hp->h_length);
         /*          /*
          * If the callee is on-machine, just copy the           * If the callee is on-machine, just copy the
          * network address, otherwise do a lookup...           * network address, otherwise do a lookup...
Line 57 
Line 56 
                 hp = gethostbyname(his_machine_name);                  hp = gethostbyname(his_machine_name);
                 if (hp == NULL)                  if (hp == NULL)
                         errx(1, "%s: %s", his_machine_name, hstrerror(h_errno));                          errx(1, "%s: %s", his_machine_name, hstrerror(h_errno));
                 bcopy(hp->h_addr, (char *) &his_machine_addr, hp->h_length);                  bcopy(hp->h_addr, &his_machine_addr, hp->h_length);
         } else          } else
                 his_machine_addr = my_machine_addr;                  his_machine_addr = my_machine_addr;
         /* find the server's port */          /* find the server's port */

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9