Print this page
8485 Remove set but unused variables in usr/src/cmd

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/ipf/tools/ipfcomp.c
          +++ new/usr/src/cmd/ipf/tools/ipfcomp.c
   1    1  /*
   2    2   * Copyright (C) 1993-2001 by Darren Reed.
   3    3   *
   4    4   * See the IPFILTER.LICENCE file for details on licencing.
   5    5   *
   6    6   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
   7    7   * Use is subject to license terms.
        8 + * Copyright 2017 Gary Mills
   8    9   */
   9   10  
  10      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  11      -
  12      -#if !defined(lint)
  13      -static const char sccsid[] = "@(#)ip_fil.c      2.41 6/5/96 (C) 1993-2000 Darren Reed";
  14      -static const char rcsid[] = "@(#)$Id: ipfcomp.c,v 1.24.2.2 2004/04/28 10:34:44 darrenr Exp $";
  15      -#endif
  16      -
  17   11  #include "ipf.h"
  18   12  
  19   13  
  20   14  typedef struct {
  21   15          int c;
  22   16          int e;
  23   17          int n;
  24   18          int p;
  25   19          int s;
  26   20  } mc_t;
↓ open down ↓ 35 lines elided ↑ open up ↑
  62   56  
  63   57  static  FILE    *cfile = NULL;
  64   58  
  65   59  /*
  66   60   * This is called once per filter rule being loaded to emit data structures
  67   61   * required.
  68   62   */
  69   63  void printc(fr)
  70   64  frentry_t *fr;
  71   65  {
  72      -        fripf_t *ipf;
  73   66          u_long *ulp;
  74   67          char *and;
  75   68          FILE *fp;
  76   69          int i;
  77   70  
  78   71          if (fr->fr_v != 4)
  79   72                  return;
  80   73          if ((fr->fr_type != FR_T_IPF) && (fr->fr_type != FR_T_NONE))
  81   74                  return;
  82   75          if ((fr->fr_type == FR_T_IPF) &&
  83   76              ((fr->fr_datype != FRI_NORMAL) || (fr->fr_satype != FRI_NORMAL)))
  84   77                  return;
  85      -        ipf = fr->fr_ipf;
  86   78  
  87   79          if (cfile == NULL)
  88   80                  cfile = fopen("ip_rules.c", "w");
  89   81          if (cfile == NULL)
  90   82                  return;
  91   83          fp = cfile;
  92   84          if (count == 0) {
  93   85                  fprintf(fp, "/*\n");
  94   86                  fprintf(fp, "* Copyright (C) 1993-2000 by Darren Reed.\n");
  95   87                  fprintf(fp, "*\n");
↓ open down ↓ 1282 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX