Print this page
8485 Remove set but unused variables in usr/src/cmd
*** 5,14 ****
--- 5,15 ----
*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
+ * Copyright 2017 Gary Mills
*/
#include <sys/types.h>
#include <sys/time.h>
#include <sys/param.h>
*** 380,391 ****
int argc;
char *argv[];
{
char *kernel, *core, *poolname;
int c, role, type, live_kernel;
! ip_pool_stat_t *plstp, plstat;
! iphtstat_t *htstp, htstat;
iphtable_t *hptr;
iplookupop_t op;
ip_pool_t *ptr;
core = NULL;
--- 381,392 ----
int argc;
char *argv[];
{
char *kernel, *core, *poolname;
int c, role, type, live_kernel;
! ip_pool_stat_t plstat;
! iphtstat_t htstat;
iphtable_t *hptr;
iplookupop_t op;
ip_pool_t *ptr;
core = NULL;
*** 467,477 ****
poollist_dead(role, poolname, type, kernel, core);
return (0);
}
if (type == IPLT_ALL || type == IPLT_POOL) {
- plstp = &plstat;
op.iplo_type = IPLT_POOL;
op.iplo_size = sizeof(plstat);
op.iplo_struct = &plstat;
op.iplo_name[0] = '\0';
op.iplo_arg = 0;
--- 468,477 ----
*** 501,511 ****
role = IPL_LOGALL;
}
}
if (type == IPLT_ALL || type == IPLT_HASH) {
- htstp = &htstat;
op.iplo_type = IPLT_HASH;
op.iplo_size = sizeof(htstat);
op.iplo_struct = &htstat;
op.iplo_name[0] = '\0';
op.iplo_arg = 0;
--- 501,510 ----
*** 640,658 ****
int poolstats(argc, argv)
int argc;
char *argv[];
{
! int c, type, role, live_kernel;
ip_pool_stat_t plstat;
- char *kernel, *core;
iphtstat_t htstat;
iplookupop_t op;
- core = NULL;
- kernel = NULL;
- live_kernel = 1;
type = IPLT_ALL;
role = IPL_LOGALL;
bzero((char *)&op, sizeof(op));
--- 639,653 ----
int poolstats(argc, argv)
int argc;
char *argv[];
{
! int c, type, role;
ip_pool_stat_t plstat;
iphtstat_t htstat;
iplookupop_t op;
type = IPLT_ALL;
role = IPL_LOGALL;
bzero((char *)&op, sizeof(op));
*** 664,679 ****
break;
case 'G' :
setzonename_global(optarg);
break;
case 'M' :
- live_kernel = 0;
- core = optarg;
break;
case 'N' :
- live_kernel = 0;
- kernel = optarg;
break;
case 'o' :
role = getrole(optarg);
if (role == IPL_LOGNONE) {
fprintf(stderr, "unknown role '%s'\n", optarg);
--- 659,670 ----