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

Diff for /src/usr.bin/rdist/child.c between version 1.16 and 1.17

version 1.16, 2011/04/18 12:29:59 version 1.17, 2014/07/04 21:50:13
Line 363 
Line 363 
         CHILD *pc;          CHILD *pc;
         fd_set *rchildfdsp = NULL;          fd_set *rchildfdsp = NULL;
         int rchildfdsn = 0;          int rchildfdsn = 0;
         size_t bytes;  
   
         debugmsg(DM_CALL, "waitup() start\n");          debugmsg(DM_CALL, "waitup() start\n");
   
Line 374 
Line 373 
                 return;                  return;
   
         /*          /*
          * Settup which children we want to select() on.           * Set up which children we want to select() on.
          */           */
         for (pc = childlist; pc; pc = pc->c_next)          for (pc = childlist; pc; pc = pc->c_next)
                 if (pc->c_readfd > rchildfdsn)                  if (pc->c_readfd > rchildfdsn)
                         rchildfdsn = pc->c_readfd;                          rchildfdsn = pc->c_readfd;
         bytes = howmany(rchildfdsn+1, NFDBITS) * sizeof(fd_mask);          rchildfdsp = calloc(howmany(rchildfdsn+1, NFDBITS), sizeof(fd_mask));
         if ((rchildfdsp = (fd_set *)malloc(bytes)) == NULL)          if (rchildfdsp == NULL)
                 return;                  return;
   
         memset(rchildfdsp, 0, bytes);  
         for (pc = childlist; pc; pc = pc->c_next)          for (pc = childlist; pc; pc = pc->c_next)
                 if (pc->c_readfd > 0) {                  if (pc->c_readfd > 0) {
                         debugmsg(DM_MISC, "waitup() select on %d (%s)\n",                          debugmsg(DM_MISC, "waitup() select on %d (%s)\n",

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17