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

Diff for /src/usr.bin/netstat/main.c between version 1.34 and 1.35

version 1.34, 2003/02/01 01:51:31 version 1.35, 2003/02/01 14:09:16
Line 550 
Line 550 
 printproto(struct protox *tp, char *name)  printproto(struct protox *tp, char *name)
 {  {
         void (*pr)();          void (*pr)();
         u_long off;          u_char i;
   
         if (sflag) {          if (sflag) {
                 pr = tp->pr_stats;                  pr = tp->pr_stats;
                 off = nl[tp->pr_sindex].n_value;                  i = tp->pr_sindex;
         } else {          } else {
                 pr = tp->pr_cblocks;                  pr = tp->pr_cblocks;
                 off = nl[tp->pr_index].n_value;                  i = tp->pr_index;
         }          }
         if (pr != NULL && (off || af != AF_UNSPEC))          if (pr != NULL && i < sizeof(nl) / sizeof(nl[0]) &&
                 (*pr)(off, name);              (nl[i].n_value || af != AF_UNSPEC))
                   (*pr)(nl[i].n_value, name);
 }  }
   
 /*  /*

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35