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

*** 18,27 **** --- 18,28 ---- * * CDDL HEADER END */ /* + * Copyright 2017 Gary Mills * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */
*** 497,507 **** int special_contents_remove(int ient, struct cfent **ppcfent, const char *pcroot) { int result = 0; /* Assume we will succeed. Return result. */ char **ppcSC = NULL; /* The special contents rules, sorted. */ ! int i, j; /* Indexes into contents & special contents */ FILE *fpi = NULL, /* Input of contents file */ *fpo = NULL; /* Output to temp contents file */ char cpath[PATH_MAX], /* Contents file path */ tcpath[PATH_MAX]; /* Temp contents file path */ const char *pccontents = "var/sadm/install/contents"; --- 498,508 ---- int special_contents_remove(int ient, struct cfent **ppcfent, const char *pcroot) { int result = 0; /* Assume we will succeed. Return result. */ char **ppcSC = NULL; /* The special contents rules, sorted. */ ! int i; /* Index into contents & special contents */ FILE *fpi = NULL, /* Input of contents file */ *fpo = NULL; /* Output to temp contents file */ char cpath[PATH_MAX], /* Contents file path */ tcpath[PATH_MAX]; /* Temp contents file path */ const char *pccontents = "var/sadm/install/contents";
*** 597,607 **** * Since both the contents and rules are sorted, we can * make a single efficient pass. */ (void) memset(line, 0, LINESZ); ! for (i = 0, j = 0; fgets(line, LINESZ, fpi) != NULL; ) { char *pcpath = NULL; /* * Note: This could be done better: We should figure out --- 598,608 ---- * Since both the contents and rules are sorted, we can * make a single efficient pass. */ (void) memset(line, 0, LINESZ); ! for (i = 0; fgets(line, LINESZ, fpi) != NULL; ) { char *pcpath = NULL; /* * Note: This could be done better: We should figure out