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

Diff for /src/usr.bin/ssh/addr.c between version 1.2 and 1.3

version 1.2, 2021/10/22 09:19:34 version 1.3, 2021/10/22 09:22:04
Line 240 
Line 240 
                 if (a->v4.s_addr == b->v4.s_addr)                  if (a->v4.s_addr == b->v4.s_addr)
                         return 0;                          return 0;
                 return (ntohl(a->v4.s_addr) > ntohl(b->v4.s_addr) ? 1 : -1);                  return (ntohl(a->v4.s_addr) > ntohl(b->v4.s_addr) ? 1 : -1);
         case AF_INET6:;          case AF_INET6:
                 /*                  /*
                  * Do this a byte at a time to avoid the above issue and                   * Do this a byte at a time to avoid the above issue and
                  * any endian problems                   * any endian problems
Line 264 
Line 264 
         switch (a->af) {          switch (a->af) {
         case AF_INET:          case AF_INET:
                 return (a->v4.s_addr == 0 ? 0 : -1);                  return (a->v4.s_addr == 0 ? 0 : -1);
         case AF_INET6:;          case AF_INET6:
                 for (i = 0; i < 4; i++)                  for (i = 0; i < 4; i++)
                         if (a->addr32[i] != 0)                          if (a->addr32[i] != 0)
                                 return -1;                                  return -1;

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