[BACK]Return to ping.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sbin / ping

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sbin/ping/ping.c between version 1.55.4.1 and 1.55.4.2

version 1.55.4.1, 2000/10/18 00:39:47 version 1.55.4.2, 2000/10/18 02:04:49
Line 666  doit(void)
Line 666  doit(void)
         int fromlen;          int fromlen;
         double sec, last, d_last;          double sec, last, d_last;
         struct timeval timeout;          struct timeval timeout;
         fd_set fdmask;          fd_set *fdmaskp;
           size_t nfdmask;
   
         (void)gettimeofday(&clear_cache,0);          (void)gettimeofday(&clear_cache,0);
         if (maxwait != 0) {          if (maxwait != 0) {
Line 678  doit(void)
Line 678  doit(void)
                 d_last = 365*24*60*60;                  d_last = 365*24*60*60;
         }          }
   
         FD_ZERO(&fdmask);          nfdmask = howmany(s + 1, NFDBITS);
           if ((fdmaskp = malloc(nfdmask)) == NULL)
                   err(1, "malloc");
           memset(fdmaskp, 0, nfdmask);
         do {          do {
                 (void)gettimeofday(&now,0);                  (void)gettimeofday(&now,0);
   
Line 713  doit(void)
Line 716  doit(void)
   
                 sec_to_timeval(sec, &timeout);                  sec_to_timeval(sec, &timeout);
   
                 FD_SET(s, &fdmask);                  FD_SET(s, fdmaskp);
                 cc = select(s+1, &fdmask, 0, 0, &timeout);                  cc = select(s+1, fdmaskp, 0, 0, &timeout);
                 if (cc <= 0) {                  if (cc <= 0) {
                         if (cc < 0) {                          if (cc < 0) {
                                 if (errno == EINTR)                                  if (errno == EINTR)
Line 742  doit(void)
Line 745  doit(void)
   
         } while (nreceived < npackets          } while (nreceived < npackets
                  && (nreceived == 0 || !(pingflags & F_ONCE)));                   && (nreceived == 0 || !(pingflags & F_ONCE)));
           free(fdmaskp);
   
         finish(0);          finish(0);
 }  }

Legend:
Removed from v.1.55.4.1  
changed lines
  Added in v.1.55.4.2

CVSweb <webmaster@jp.NetBSD.org>