fix unused variable warnings.

This commit is contained in:
christos 2013-10-19 17:16:37 +00:00
parent 94a96ec4ae
commit 0a77b69ab6
31 changed files with 151 additions and 195 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: aml_common.c,v 1.3 2011/05/30 01:15:30 dyoung Exp $ */
/* $NetBSD: aml_common.c,v 1.4 2013/10/19 17:16:37 christos Exp $ */
/*-
* Copyright (c) 1999 Takanori Watanabe
@ -30,7 +30,7 @@
* $FreeBSD: src/usr.sbin/acpi/amldb/aml/aml_common.c,v 1.6 2000/11/09 06:24:45 iwasaki Exp $
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: aml_common.c,v 1.3 2011/05/30 01:15:30 dyoung Exp $");
__RCSID("$NetBSD: aml_common.c,v 1.4 2013/10/19 17:16:37 christos Exp $");
#include <sys/param.h>
@ -537,10 +537,8 @@ aml_region_handle_alloc(struct aml_environ *env, int regtype, u_int32_t flags,
struct aml_region_handle *h)
{
int state;
struct aml_name *pci_info;
state = 0;
pci_info = NULL;
bzero(h, sizeof(struct aml_region_handle));
h->env = env;

View File

@ -1,4 +1,4 @@
/* $NetBSD: aml_parse.c,v 1.3 2011/06/21 09:36:46 mrg Exp $ */
/* $NetBSD: aml_parse.c,v 1.4 2013/10/19 17:16:37 christos Exp $ */
/*-
* Copyright (c) 1999 Doug Rabson
@ -30,7 +30,7 @@
* $FreeBSD: src/usr.sbin/acpi/amldb/aml/aml_parse.c,v 1.7 2001/10/23 14:54:15 takawata Exp $
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: aml_parse.c,v 1.3 2011/06/21 09:36:46 mrg Exp $");
__RCSID("$NetBSD: aml_parse.c,v 1.4 2013/10/19 17:16:37 christos Exp $");
#include <sys/param.h>
@ -761,12 +761,10 @@ static void
aml_parse_fieldlist(struct aml_environ *env, struct aml_field *template,
int indent)
{
u_int32_t offset;
offset = 0;
while (env->dp < env->end) {
aml_print_indent(indent);
offset = aml_parse_field(env, template);
(void)aml_parse_field(env, template);
if (env->dp < env->end) {
AML_DEBUGPRINT(",\n");
} else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: quip_client.c,v 1.9 2006/10/12 19:59:13 peter Exp $ */
/* $NetBSD: quip_client.c,v 1.10 2013/10/19 17:16:37 christos Exp $ */
/* $KAME: quip_client.c,v 1.9 2003/05/17 05:59:00 itojun Exp $ */
/*
* Copyright (C) 1999-2000
@ -269,7 +269,6 @@ void
quip_rawmode(void)
{
char line[MAXLINESIZE];
int result_code;
printf(">>>Entering the raw interactive mode to the server:\n\n");
if (server == NULL) {
@ -297,7 +296,7 @@ quip_rawmode(void)
quip_sendrequest(server, line);
/* get a response message from the server */
result_code = quip_recvresponse(server, NULL, NULL, NULL);
(void)quip_recvresponse(server, NULL, NULL, NULL);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: qop_cbq.c,v 1.9 2010/01/06 06:30:37 mbalmer Exp $ */
/* $NetBSD: qop_cbq.c,v 1.10 2013/10/19 17:16:37 christos Exp $ */
/* $KAME: qop_cbq.c,v 1.7 2002/05/31 06:03:35 kjc Exp $ */
/*
* Copyright (c) Sun Microsystems, Inc. 1993-1998 All rights reserved.
@ -762,7 +762,6 @@ cbq_class_spec(struct ifinfo *ifinfo, u_long parent_class,
double f;
double gton;
double gtom;
double maxrate;
/* Compute other class parameters */
if (bandwidth == 0)
@ -783,7 +782,6 @@ cbq_class_spec(struct ifinfo *ifinfo, u_long parent_class,
nsPerByte = cbq_ifinfo->nsPerByte / f;
ptime = (double) av_pkt_size * (double)cbq_ifinfo->nsPerByte;
maxrate = f * ((double)ifinfo->bandwidth / 8.0);
cptime = ptime * (1.0 - f) / f;
#if 1 /* ALTQ */
if (nsPerByte * (double)max_pkt_size > (double)INT_MAX) {
@ -997,9 +995,7 @@ cbq_add_class(struct classinfo *clinfo)
{
struct cbq_add_class class_add;
struct cbq_classinfo *cbq_clinfo;
struct cbq_ifinfo *cbq_ifinfo;
cbq_ifinfo = clinfo->ifinfo->private;
cbq_clinfo = clinfo->private;
memset(&class_add, 0, sizeof(class_add));

View File

@ -1,4 +1,4 @@
/* $NetBSD: qop_hfsc.c,v 1.9 2010/03/01 00:13:47 joerg Exp $ */
/* $NetBSD: qop_hfsc.c,v 1.10 2013/10/19 17:16:37 christos Exp $ */
/* $KAME: qop_hfsc.c,v 1.12 2005/01/05 04:53:47 itojun Exp $ */
/*
* Copyright (C) 1999-2000
@ -1071,9 +1071,7 @@ hfsc_add_class(struct classinfo *clinfo)
{
struct hfsc_add_class class_add;
struct hfsc_classinfo *hfsc_clinfo;
struct hfsc_ifinfo *hfsc_ifinfo;
hfsc_ifinfo = clinfo->ifinfo->private;
hfsc_clinfo = clinfo->private;
memset(&class_add, 0, sizeof(class_add));

View File

@ -449,9 +449,6 @@ qop_jobs_delete_class_hook(struct classinfo *clinfo)
* i'm not sure how/when it's used, so I just
* leave it here
*/
struct jobs_classinfo *jobs_clinfo;
jobs_clinfo = clinfo->private;
return (0);
}
@ -610,9 +607,7 @@ jobs_add_class(struct classinfo *clinfo)
{
struct jobs_add_class class_add;
struct jobs_classinfo *jobs_clinfo;
struct jobs_ifinfo *jobs_ifinfo;
jobs_ifinfo = clinfo->ifinfo->private;
jobs_clinfo = clinfo->private;
memset(&class_add, 0, sizeof(class_add));

View File

@ -1,4 +1,4 @@
/* $NetBSD: qop_priq.c,v 1.5 2002/03/05 04:11:53 itojun Exp $ */
/* $NetBSD: qop_priq.c,v 1.6 2013/10/19 17:16:37 christos Exp $ */
/* $KAME: qop_priq.c,v 1.4 2001/12/03 08:20:55 kjc Exp $ */
/*
* Copyright (C) 2000
@ -305,13 +305,12 @@ int
qop_priq_modify_class(struct classinfo *clinfo,
int pri, int qlimit, int flags)
{
struct priq_classinfo *priq_clinfo, *parent_clinfo;
struct priq_classinfo *priq_clinfo;
int error;
priq_clinfo = clinfo->private;
if (clinfo->parent == NULL)
return (QOPERR_CLASS_INVAL);
parent_clinfo = clinfo->parent->private;
priq_clinfo->pri = pri;
priq_clinfo->qlimit = qlimit;
@ -431,9 +430,7 @@ priq_add_class(struct classinfo *clinfo)
{
struct priq_add_class class_add;
struct priq_classinfo *priq_clinfo;
struct priq_ifinfo *priq_ifinfo;
priq_ifinfo = clinfo->ifinfo->private;
priq_clinfo = clinfo->private;
memset(&class_add, 0, sizeof(class_add));

View File

@ -1,4 +1,4 @@
/* $NetBSD: quip_server.c,v 1.5 2009/04/15 00:13:51 lukem Exp $ */
/* $NetBSD: quip_server.c,v 1.6 2013/10/19 17:16:37 christos Exp $ */
/* $KAME: quip_server.c,v 1.6 2001/08/20 06:41:32 kjc Exp $ */
/*
* Copyright (C) 1999-2000
@ -213,7 +213,6 @@ query_handle2name(const char *cmd, const char *arg, char *msg, size_t maxmsg)
struct fltrinfo *fltrinfo;
char *ifname, *class_field, *fltr_field, buf[256], *cp;
u_long handle;
int len;
strlcpy(buf, arg, sizeof(buf));
cp = buf;
@ -229,7 +228,7 @@ query_handle2name(const char *cmd, const char *arg, char *msg, size_t maxmsg)
if ((fltrinfo = flhandle2fltrinfo(ifinfo, handle)) == NULL)
return (-1);
len = expand_filtername(fltrinfo, msg, maxmsg);
(void)expand_filtername(fltrinfo, msg, maxmsg);
} else {
if (sscanf(class_field, "%lx", &handle) != 1)
return (-1);
@ -238,7 +237,7 @@ query_handle2name(const char *cmd, const char *arg, char *msg, size_t maxmsg)
if ((clinfo = clhandle2clinfo(ifinfo, handle)) == NULL)
return (-1);
len = expand_classname(clinfo, msg, maxmsg);
(void)expand_classname(clinfo, msg, maxmsg);
}
strlcat(msg, "\n", maxmsg);
return (strlen(msg));
@ -264,13 +263,13 @@ query_filterspec(const char *cmd, const char *arg, char *msg, size_t maxmsg)
struct ifinfo *ifinfo;
struct fltrinfo *fltrinfo;
struct flow_filter *filt;
char *ifname, *class_field, *fltr_field, buf[256], *cp;
char *ifname, *fltr_field, buf[256], *cp;
u_long handle;
strlcpy(buf, arg, sizeof(buf));
cp = buf;
ifname = strsep(&cp, ":");
class_field = strsep(&cp, ":");
(void)strsep(&cp, ":");
fltr_field = cp;
if (fltr_field == NULL)

View File

@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: print-bootp.c,v 1.10 2009/04/15 00:23:29 lukem Exp $");
__RCSID("$NetBSD: print-bootp.c,v 1.11 2013/10/19 17:16:37 christos Exp $");
/* 93/10/10 <gwr@mc.com> New data-driven option print routine. */
#endif
@ -375,7 +375,6 @@ static void
cmu_print(u_char *bp, int length)
{
struct cmu_vend *v;
u_char *ep;
printf("-cmu");
@ -384,8 +383,6 @@ cmu_print(u_char *bp, int length)
printf(" |L=%d", length);
return;
}
/* Setup end pointer */
ep = bp + length;
/* Subnet mask */
if (v->v_flags & VF_SMASK) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660.c,v 1.44 2013/07/30 16:02:23 reinoud Exp $ */
/* $NetBSD: cd9660.c,v 1.45 2013/10/19 17:16:37 christos Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@ -103,7 +103,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
__RCSID("$NetBSD: cd9660.c,v 1.44 2013/07/30 16:02:23 reinoud Exp $");
__RCSID("$NetBSD: cd9660.c,v 1.45 2013/10/19 17:16:37 christos Exp $");
#endif /* !__lint */
#include <string.h>
@ -660,10 +660,6 @@ static void
cd9660_finalize_PVD(iso9660_disk *diskStructure)
{
time_t tim;
unsigned char *temp;
/* Copy the root directory record */
temp = (unsigned char *) &diskStructure->primaryDescriptor;
/* root should be a fixed size of 34 bytes since it has no name */
memcpy(diskStructure->primaryDescriptor.root_directory_record,
@ -824,15 +820,14 @@ static int
cd9660_translate_node_common(iso9660_disk *diskStructure, cd9660node *newnode)
{
time_t tim;
int test;
u_char flag;
char temp[ISO_FILENAME_MAXLENGTH_WITH_PADDING];
/* Now populate the isoDirRecord structure */
memset(temp, 0, ISO_FILENAME_MAXLENGTH_WITH_PADDING);
test = cd9660_convert_filename(diskStructure, newnode->node->name,
temp, !(S_ISDIR(newnode->node->type)));
(void)cd9660_convert_filename(diskStructure, newnode->node->name,
temp, !(S_ISDIR(newnode->node->type)));
flag = ISO_FLAG_CLEAR;
if (S_ISDIR(newnode->node->type))
@ -1127,7 +1122,7 @@ cd9660_rename_filename(iso9660_disk *diskStructure, cd9660node *iter, int num,
* See if you can spot them all :)
*/
/*
#if 0
if (diskStructure->isoLevel == 1) {
numbts = 8 - digits - delete_chars;
if (dot < 0) {
@ -1138,7 +1133,11 @@ cd9660_rename_filename(iso9660_disk *diskStructure, cd9660node *iter, int num,
}
}
}
*/
#else
__USE(dot);
__USE(semi);
__USE(multiplier);
#endif
/* (copying just the filename before the '.' */
memcpy(tmp, (iter->o_name), numbts);
@ -1545,7 +1544,6 @@ cd9660_generate_path_table(iso9660_disk *diskStructure)
cd9660node *last = dirNode;
int pathTableSize = 0; /* computed as we go */
int counter = 1; /* root gets a count of 0 */
int parentRecNum = 0; /* root's parent is '0' */
TAILQ_HEAD(cd9660_pt_head, ptq_entry) pt_head;
TAILQ_INIT(&pt_head);
@ -1575,10 +1573,6 @@ cd9660_generate_path_table(iso9660_disk *diskStructure)
}
last = dirNode;
parentRecNum = 1;
if (dirNode->parent != 0)
parentRecNum = dirNode->parent->ptnumber;
/* Push children onto queue */
TAILQ_FOREACH(cn, &dirNode->cn_children, cn_next_child) {
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_debug.c,v 1.12 2013/01/28 21:03:28 christos Exp $ */
/* $NetBSD: cd9660_debug.c,v 1.13 2013/10/19 17:16:37 christos Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@ -40,7 +40,7 @@
#include <sys/param.h>
#if defined(__RCSID) && !defined(__lint)
__RCSID("$NetBSD: cd9660_debug.c,v 1.12 2013/01/28 21:03:28 christos Exp $");
__RCSID("$NetBSD: cd9660_debug.c,v 1.13 2013/10/19 17:16:37 christos Exp $");
#endif /* !__lint */
#if !HAVE_NBTOOL_CONFIG_H
@ -237,6 +237,7 @@ debug_dump_to_xml(FILE *fd)
struct iso_primary_descriptor primaryVD;
struct _boot_volume_descriptor bootVD;
memset(&primaryVD, 0, sizeof(primaryVD));
printf("<cd9660dump>\n");
/* Display Volume Descriptors */

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_write.c,v 1.16 2013/01/28 21:03:28 christos Exp $ */
/* $NetBSD: cd9660_write.c,v 1.17 2013/10/19 17:16:37 christos Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
__RCSID("$NetBSD: cd9660_write.c,v 1.16 2013/01/28 21:03:28 christos Exp $");
__RCSID("$NetBSD: cd9660_write.c,v 1.17 2013/10/19 17:16:37 christos Exp $");
#endif /* !__lint */
#include <util.h>
@ -145,10 +145,7 @@ static int
cd9660_write_volume_descriptors(iso9660_disk *diskStructure, FILE *fd)
{
volume_descriptor *vd_temp = diskStructure->firstVolumeDescriptor;
int pos;
while (vd_temp != NULL) {
pos = vd_temp->sector * diskStructure->sectorSize;
cd9660_write_filedata(diskStructure, fd, vd_temp->sector,
vd_temp->volumeDescriptorData, 1);
vd_temp = vd_temp->next;
@ -267,7 +264,6 @@ cd9660_write_file(iso9660_disk *diskStructure, FILE *fd, cd9660node *writenode)
int ret;
off_t working_sector;
int cur_sector_offset;
int written;
iso_directory_record_cd9660 temp_record;
cd9660node *temp;
int rv = 0;
@ -337,7 +333,7 @@ cd9660_write_file(iso9660_disk *diskStructure, FILE *fd, cd9660node *writenode)
err(1, "fseeko");
}
/* Write out the basic ISO directory record */
written = fwrite(&temp_record, 1,
(void)fwrite(&temp_record, 1,
temp->isoDirRecord->length[0], fd);
if (diskStructure->rock_ridge_enabled) {
cd9660_write_rr(diskStructure, fd, temp,

View File

@ -1,4 +1,4 @@
/* $NetBSD: mkfs.c,v 1.31 2013/06/23 22:03:34 dholland Exp $ */
/* $NetBSD: mkfs.c,v 1.32 2013/10/19 17:16:37 christos Exp $ */
/*
* Copyright (c) 2002 Networks Associates Technology, Inc.
@ -48,7 +48,7 @@
static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95";
#else
#ifdef __RCSID
__RCSID("$NetBSD: mkfs.c,v 1.31 2013/06/23 22:03:34 dholland Exp $");
__RCSID("$NetBSD: mkfs.c,v 1.32 2013/10/19 17:16:37 christos Exp $");
#endif
#endif
#endif /* not lint */
@ -128,7 +128,7 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts)
int32_t cylno, i, csfrags;
long long sizepb;
void *space;
int size, blks;
int size;
int nprintcols, printcolwidth;
ffs_opt_t *ffs_opts = fsopts->fs_specific;
@ -413,7 +413,6 @@ ffs_mkfs(const char *fsys, const fsinfo_t *fsopts)
* Cribbed from ffs_mountfs().
*/
size = sblock.fs_cssize;
blks = howmany(size, sblock.fs_fsize);
if (sblock.fs_contigsumsize > 0)
size += sblock.fs_ncg * sizeof(int32_t);
space = ecalloc(1, size);

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_denode.c,v 1.5 2013/01/28 21:03:29 christos Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.6 2013/10/19 17:16:37 christos Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -52,7 +52,7 @@
#endif
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: msdosfs_denode.c,v 1.5 2013/01/28 21:03:29 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: msdosfs_denode.c,v 1.6 2013/10/19 17:16:37 christos Exp $");
#include <sys/param.h>
@ -319,7 +319,7 @@ int
deextend(struct denode *dep, u_long length, struct kauth_cred *cred)
{
struct msdosfsmount *pmp = dep->de_pmp;
u_long count, osize;
u_long count;
int error;
/*
@ -357,7 +357,6 @@ deextend(struct denode *dep, u_long length, struct kauth_cred *cred)
* memset(); we set the write size so ubc won't read in file data that
* is zero'd later.
*/
osize = dep->de_FileSize;
dep->de_FileSize = length;
dep->de_flag |= DE_UPDATE|DE_MODIFIED;
return 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_vnops.c,v 1.14 2013/01/29 19:45:47 christos Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.15 2013/10/19 17:16:37 christos Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -51,7 +51,7 @@
#endif
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.14 2013/01/29 19:45:47 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.15 2013/10/19 17:16:37 christos Exp $");
#include <sys/param.h>
#include <sys/mman.h>
@ -136,7 +136,6 @@ msdosfs_findslot(struct denode *dp, struct componentname *cnp)
int blkoff;
u_int diroff;
int blsize;
struct denode *tdp;
struct msdosfsmount *pmp;
struct buf *bp = 0;
struct direntry *dep;
@ -179,7 +178,6 @@ msdosfs_findslot(struct denode *dp, struct componentname *cnp)
* Search the directory pointed at by vdp for the name pointed at
* by cnp->cn_nameptr.
*/
tdp = NULL;
/*
* The outer loop ranges over the clusters that make up the
* directory. Note that the root directory is different from all

View File

@ -1,4 +1,4 @@
/* $NetBSD: udf.c,v 1.13 2013/08/14 10:16:04 jmcneill Exp $ */
/* $NetBSD: udf.c,v 1.14 2013/10/19 17:16:37 christos Exp $ */
/*
* Copyright (c) 2006, 2008, 2013 Reinoud Zandijk
@ -30,7 +30,7 @@
#endif
#include <sys/cdefs.h>
__RCSID("$NetBSD: udf.c,v 1.13 2013/08/14 10:16:04 jmcneill Exp $");
__RCSID("$NetBSD: udf.c,v 1.14 2013/10/19 17:16:37 christos Exp $");
#include <stdio.h>
#include <stdlib.h>
@ -368,7 +368,6 @@ udf_parse_opts(const char *option, fsinfo_t *fsopts)
option_t *udf_options = fsopts->fs_options;
uint64_t stdsize;
uint32_t set_sectorsize;
const char *name, *desc;
char buffer[1024], *buf, *colon;
int i;
@ -388,8 +387,6 @@ udf_parse_opts(const char *option, fsinfo_t *fsopts)
stdsize = 0;
buf = buffer;
name = udf_options[i].name;
desc = udf_options[i].desc;
switch (udf_options[i].letter) {
case 'T':
if (strcmp(buf, "cdrom") == 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: mmcformat.c,v 1.3 2009/01/18 09:58:41 lukem Exp $ */
/* $NetBSD: mmcformat.c,v 1.4 2013/10/19 17:16:37 christos Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@ -510,11 +510,8 @@ uscsi_format_cdrw_mode7(struct uscsi_dev *mydev, uint32_t blocks)
{
scsicmd cmd;
struct uscsi_sense sense;
uint32_t param;
uint8_t buffer[16];
int cnt, error;
param = cnt = 0;
int error;
if (blocks % 32) {
blocks -= blocks % 32;

View File

@ -1,4 +1,4 @@
/* $NetBSD: process.c,v 1.18 2011/05/24 13:08:17 joerg Exp $ */
/* $NetBSD: process.c,v 1.19 2013/10/19 17:16:37 christos Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: process.c,v 1.18 2011/05/24 13:08:17 joerg Exp $");
__RCSID("$NetBSD: process.c,v 1.19 2013/10/19 17:16:37 christos Exp $");
#endif
#include "os.h"
@ -63,7 +63,6 @@ mopProcessInfo(const u_char *pkt, int *idx, u_short moplen, struct dllist *dl_rp
{
u_short itype,tmps;
u_char ilen ,tmpc,device;
u_char uc1,uc2,uc3;
const u_char *ucp;
device = 0;
@ -87,9 +86,9 @@ mopProcessInfo(const u_char *pkt, int *idx, u_short moplen, struct dllist *dl_rp
*idx = *idx + tmpc;
break;
case MOP_K_INFO_VER:
uc1 = mopGetChar(pkt,idx);
uc2 = mopGetChar(pkt,idx);
uc3 = mopGetChar(pkt,idx);
(void)mopGetChar(pkt,idx);
(void)mopGetChar(pkt,idx);
(void)mopGetChar(pkt,idx);
break;
case MOP_K_INFO_MFCT:
tmps = mopGetShort(pkt,idx);
@ -163,24 +162,24 @@ mopProcessInfo(const u_char *pkt, int *idx, u_short moplen, struct dllist *dl_rp
}
itype = mopGetShort(pkt,idx);
}
__USE(ucp);
}
void
mopSendASV(const u_char *dst, const u_char *src, struct if_info *ii, int trans)
{
u_char pkt[200], *p;
u_char pkt[200];
int idx;
u_char mopcode = MOP_K_CODE_ASV;
u_short newlen = 0,ptype = MOP_K_PROTO_DL;
u_short ptype = MOP_K_PROTO_DL;
idx = 0;
mopPutHeader(pkt, &idx, dst, src, ptype, trans);
p = &pkt[idx];
mopPutChar(pkt,&idx,mopcode);
mopPutLength(pkt, trans, idx);
newlen = mopGetLength(pkt, trans);
(void)mopGetLength(pkt, trans);
if (DebugFlag == DEBUG_ONELINE) {
mopPrintOneline(stdout, pkt, trans);
@ -210,10 +209,10 @@ mopStartLoad(const u_char *dst, const u_char *src, struct dllist *dl_rpr,
{
int len;
int i, slot;
u_char pkt[BUFSIZE], *p;
u_char pkt[BUFSIZE];
int idx;
u_char mopcode = MOP_K_CODE_MLD;
u_short newlen,ptype = MOP_K_PROTO_DL;
u_short ptype = MOP_K_PROTO_DL;
struct dllist *dle;
slot = -1;
@ -273,7 +272,6 @@ mopStartLoad(const u_char *dst, const u_char *src, struct dllist *dl_rpr,
idx = 0;
mopPutHeader(pkt, &idx, dst, src, ptype, trans);
p = &pkt[idx];
mopPutChar (pkt, &idx, mopcode);
mopPutChar (pkt, &idx, dle->count);
@ -285,7 +283,7 @@ mopStartLoad(const u_char *dst, const u_char *src, struct dllist *dl_rpr,
idx = idx + len;
mopPutLength(pkt, trans, idx);
newlen = mopGetLength(pkt, trans);
(void)mopGetLength(pkt, trans);
if (DebugFlag == DEBUG_ONELINE) {
mopPrintOneline(stdout, pkt, trans);
@ -314,10 +312,10 @@ mopNextLoad(const u_char *dst, const u_char *src, u_char new_count, int trans)
{
int len;
int i, slot;
u_char pkt[BUFSIZE], *p;
u_char pkt[BUFSIZE];
int idx, pindex;
char line[100];
u_short newlen = 0,ptype = MOP_K_PROTO_DL;
u_short ptype = MOP_K_PROTO_DL;
u_char mopcode;
struct dllist *dle;
@ -362,7 +360,6 @@ mopNextLoad(const u_char *dst, const u_char *src, u_char new_count, int trans)
idx = 0;
mopPutHeader(pkt, &idx, dst, src, ptype, trans);
p = &pkt[idx];
mopcode = MOP_K_CODE_MLD;
pindex = idx;
mopPutChar (pkt,&idx, mopcode);
@ -377,7 +374,7 @@ mopNextLoad(const u_char *dst, const u_char *src, u_char new_count, int trans)
idx = idx + len;
mopPutLength(pkt, trans, idx);
newlen = mopGetLength(pkt, trans);
(void)mopGetLength(pkt, trans);
} else {
if (len == 0) {
@ -397,7 +394,7 @@ mopNextLoad(const u_char *dst, const u_char *src, u_char new_count, int trans)
mopPutLong (pkt, &idx, dle->xferaddr);
mopPutLength(pkt, trans, idx);
newlen = mopGetLength(pkt, trans);
(void)mopGetLength(pkt, trans);
dle->status = DL_STATUS_SENT_PLT;
} else {
@ -435,9 +432,9 @@ mopProcessDL(FILE *fd, struct if_info *ii, const u_char *pkt, int *idx,
u_char pfile[129], mopcode;
char filename[FILENAME_MAX];
char line[100];
int i,nfd,iindex;
struct dllist dl,*dl_rpr;
u_char rpr_pgty,load;
int i, nfd;
struct dllist dl, *dl_rpr;
u_char load;
if (DebugFlag == DEBUG_ONELINE) {
mopPrintOneline(stdout, pkt, trans);
@ -478,7 +475,7 @@ mopProcessDL(FILE *fd, struct if_info *ii, const u_char *pkt, int *idx,
(void)fprintf(stderr,"\n");
}
rpr_pgty = mopGetChar(pkt,idx); /* Program Type */
(void)mopGetChar(pkt,idx); /* Program Type */
tmpc = mopGetChar(pkt,idx); /* Software ID Len */
if (tmpc > sizeof(pfile) - 1)
@ -503,7 +500,6 @@ mopProcessDL(FILE *fd, struct if_info *ii, const u_char *pkt, int *idx,
tmpc = mopGetChar(pkt,idx); /* Processor */
iindex = *idx;
dl_rpr = &dl;
memset(dl_rpr, 0, sizeof(*dl_rpr));
dl_rpr->ii = ii;
@ -569,7 +565,7 @@ mopProcessRC(FILE *fd, struct if_info *ii, const u_char *pkt, int *idx,
const u_char *dst, const u_char *src, int trans, u_short len)
{
u_char tmpc;
u_short tmps, moplen = 0;
u_short moplen = 0;
u_char mopcode;
struct dllist dl,*dl_rpr;
@ -602,7 +598,7 @@ mopProcessRC(FILE *fd, struct if_info *ii, const u_char *pkt, int *idx,
(void)fprintf(stderr, "Reserved : %02x\n",tmpc);
}
tmps = mopGetShort(pkt,idx); /* Receipt # */
(void)mopGetShort(pkt,idx); /* Receipt # */
if ((DebugFlag >= DEBUG_INFO)) {
(void)fprintf(stderr, "Receipt Nbr : %04x\n",tmpc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mopprobe.c,v 1.11 2011/08/30 19:49:11 joerg Exp $ */
/* $NetBSD: mopprobe.c,v 1.12 2013/10/19 17:16:37 christos Exp $ */
/*
* Copyright (c) 1993-96 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mopprobe.c,v 1.11 2011/08/30 19:49:11 joerg Exp $");
__RCSID("$NetBSD: mopprobe.c,v 1.12 2013/10/19 17:16:37 christos Exp $");
#endif
/*
@ -128,7 +128,7 @@ void
mopProcess(struct if_info *ii, u_char *pkt)
{
u_char *dst, *src, *p, mopcode, tmpc, ilen;
u_short *ptype, moplen, tmps, itype, len;
u_short *ptype, moplen, itype, len;
int idx, i, device, trans;
dst = pkt;
@ -177,7 +177,7 @@ mopProcess(struct if_info *ii, u_char *pkt)
}
tmpc = mopGetChar(pkt,&idx); /* Reserved */
tmps = mopGetShort(pkt,&idx); /* Receipt # */
(void)mopGetShort(pkt,&idx); /* Receipt # */
device = 0; /* Unknown Device */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mountd.c,v 1.124 2012/01/04 16:09:44 drochner Exp $ */
/* $NetBSD: mountd.c,v 1.125 2013/10/19 17:16:37 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\
#if 0
static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95";
#else
__RCSID("$NetBSD: mountd.c,v 1.124 2012/01/04 16:09:44 drochner Exp $");
__RCSID("$NetBSD: mountd.c,v 1.125 2013/10/19 17:16:37 christos Exp $");
#endif
#endif /* not lint */
@ -479,7 +479,6 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *transp)
struct fhreturn fhr;
struct stat stb;
struct statvfs fsb;
struct addrinfo *ai;
char host[NI_MAXHOST], numerichost[NI_MAXHOST];
int lookup_failed = 1;
struct sockaddr *saddr;
@ -513,7 +512,6 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *transp)
if (getnameinfo(saddr, saddr->sa_len, numerichost,
sizeof numerichost, NULL, 0, ninumeric) != 0)
strlcpy(numerichost, "?", sizeof(numerichost));
ai = NULL;
ret = 0;
switch (rqstp->rq_proc) {
case NULLPROC:

View File

@ -1,4 +1,4 @@
/* $NetBSD: moused.c,v 1.23 2013/06/28 15:04:35 joerg Exp $ */
/* $NetBSD: moused.c,v 1.24 2013/10/19 17:16:38 christos Exp $ */
/**
** Copyright (c) 1995 Michael Smith, All rights reserved.
**
@ -48,7 +48,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: moused.c,v 1.23 2013/06/28 15:04:35 joerg Exp $");
__RCSID("$NetBSD: moused.c,v 1.24 2013/10/19 17:16:38 christos Exp $");
#endif /* not lint */
#include <ctype.h>
@ -1514,7 +1514,7 @@ r_protocol(u_char rBuf, mousestatus_t *act)
debug("received char 0x%x",(int)rBuf);
if (rodent.rtype == MOUSE_PROTO_KIDSPAD)
return kidspad(rBuf, act) ;
return kidspad(rBuf, act);
/*
* Hack for resyncing: We check here for a package that is:
@ -2763,67 +2763,66 @@ we store the last coordinates sent when the pen went out of the tablet,
typedef enum {
S_IDLE, S_PROXY, S_FIRST, S_DOWN, S_UP
} k_status ;
} k_status;
static int
kidspad(u_char rxc, mousestatus_t *act)
{
static int buf[5];
static int buflen = 0, b_prev = 0 , x_prev = -1, y_prev = -1 ;
static k_status status = S_IDLE ;
static struct timeval old, now ;
static int buflen = 0, b_prev = 0 , x_prev = -1, y_prev = -1;
static k_status status = S_IDLE;
static struct timeval now;
int x, y ;
int x, y;
if (buflen > 0 && (rxc & 0x80) ) {
fprintf(stderr, "invalid code %d 0x%x\n", buflen, rxc);
buflen = 0 ;
buflen = 0;
}
if (buflen == 0 && (rxc & 0xb8) != 0xb8 ) {
fprintf(stderr, "invalid code 0 0x%x\n", rxc);
return 0 ; /* invalid code, no action */
return 0; /* invalid code, no action */
}
buf[buflen++] = rxc ;
buf[buflen++] = rxc;
if (buflen < 5)
return 0 ;
return 0;
buflen = 0 ; /* for next time... */
buflen = 0; /* for next time... */
x = buf[1]+128*(buf[2] - 7) ;
if (x < 0) x = 0 ;
y = 28*128 - (buf[3] + 128* (buf[4] - 7)) ;
if (y < 0) y = 0 ;
x = buf[1]+128*(buf[2] - 7);
if (x < 0) x = 0;
y = 28*128 - (buf[3] + 128* (buf[4] - 7));
if (y < 0) y = 0;
x /= 8 ;
y /= 8 ;
x /= 8;
y /= 8;
act->flags = 0 ;
act->obutton = act->button ;
act->dx = act->dy = act->dz = 0 ;
act->flags = 0;
act->obutton = act->button;
act->dx = act->dy = act->dz = 0;
gettimeofday(&now, NULL);
if ( buf[0] & 0x40 ) /* pen went out of reach */
status = S_IDLE ;
status = S_IDLE;
else if (status == S_IDLE) { /* pen is newly near the tablet */
act->flags |= MOUSE_POSCHANGED ; /* force update */
status = S_PROXY ;
x_prev = x ;
y_prev = y ;
act->flags |= MOUSE_POSCHANGED; /* force update */
status = S_PROXY;
x_prev = x;
y_prev = y;
}
old = now ;
act->dx = x - x_prev ;
act->dy = y - y_prev ;
act->dx = x - x_prev;
act->dy = y - y_prev;
if (act->dx || act->dy)
act->flags |= MOUSE_POSCHANGED ;
x_prev = x ;
y_prev = y ;
act->flags |= MOUSE_POSCHANGED;
x_prev = x;
y_prev = y;
if (b_prev != 0 && b_prev != buf[0]) { /* possibly record button change */
act->button = 0 ;
act->button = 0;
if ( buf[0] & 0x01 ) /* tip pressed */
act->button |= MOUSE_BUTTON1DOWN ;
act->button |= MOUSE_BUTTON1DOWN;
if ( buf[0] & 0x02 ) /* button pressed */
act->button |= MOUSE_BUTTON2DOWN ;
act->flags |= MOUSE_BUTTONSCHANGED ;
act->button |= MOUSE_BUTTON2DOWN;
act->flags |= MOUSE_BUTTONSCHANGED;
}
b_prev = buf[0] ;
return act->flags ;
b_prev = buf[0];
return act->flags;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: parse.y,v 1.1 2010/05/07 17:41:58 degroote Exp $ */
/* $NetBSD: parse.y,v 1.2 2013/10/19 17:16:38 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: parse.y,v 1.1 2010/05/07 17:41:58 degroote Exp $");
__RCSID("$NetBSD: parse.y,v 1.2 2013/10/19 17:16:38 christos Exp $");
#endif
#include <stdio.h>
@ -480,7 +480,6 @@ retrieve_seq(const char* str, struct pfsync_state_peer* peer)
static void
add_state(void)
{
int idx;
if (allocated == 0) {
allocated = 5;
@ -500,5 +499,4 @@ add_state(void)
states->ps_buf = buf;
}
idx = states->ps_len / sizeof(struct pfsync_state);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: tdb.c,v 1.6 2007/01/16 17:32:05 hubertf Exp $ */
/* $NetBSD: tdb.c,v 1.7 2013/10/19 17:16:38 christos Exp $ */
/*
* Database functions
@ -21,7 +21,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: tdb.c,v 1.6 2007/01/16 17:32:05 hubertf Exp $");
__RCSID("$NetBSD: tdb.c,v 1.7 2013/10/19 17:16:38 christos Exp $");
#endif
#include <stdlib.h>
@ -498,7 +498,6 @@ static tdb_off tdb_allocate(TDB_CONTEXT *tdb, tdb_len length)
static int tdb_new_database(TDB_CONTEXT *tdb, int hash_size)
{
struct tdb_header header;
tdb_off offset;
int i, size = 0;
tdb_off buf[16];
@ -517,7 +516,6 @@ static int tdb_new_database(TDB_CONTEXT *tdb, int hash_size)
} else size += sizeof(header);
/* the freelist and hash pointers */
offset = 0;
memset(buf, 0, sizeof(buf));
for (i=0;(hash_size+1)-i >= 16; i += 16) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: pstat.c,v 1.120 2012/11/10 11:01:52 apb Exp $ */
/* $NetBSD: pstat.c,v 1.121 2013/10/19 17:16:38 christos Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993, 1994\
#if 0
static char sccsid[] = "@(#)pstat.c 8.16 (Berkeley) 5/9/95";
#else
__RCSID("$NetBSD: pstat.c,v 1.120 2012/11/10 11:01:52 apb Exp $");
__RCSID("$NetBSD: pstat.c,v 1.121 2013/10/19 17:16:38 christos Exp $");
#endif
#endif /* not lint */
@ -683,7 +683,10 @@ loadvnodes(int *avnodes)
{
int mib[2];
int status;
size_t copysize, oldsize;
size_t copysize;
#if 0
size_t oldsize;
#endif
char *vnodebase;
if (totalflag) {
@ -709,7 +712,9 @@ loadvnodes(int *avnodes)
*/
if (sysctl(mib, 2, NULL, &copysize, NULL, 0) == -1)
err(1, "sysctl: KERN_VNODE");
#if 0
oldsize = copysize;
#endif
copysize += 100 * sizeof(struct vnode) + copysize / 20;
if ((vnodebase = malloc(copysize)) == NULL)
err(1, "malloc");

View File

@ -1,4 +1,4 @@
/* $NetBSD: quot.c,v 1.32 2013/06/23 07:28:37 dholland Exp $ */
/* $NetBSD: quot.c,v 1.33 2013/10/19 17:16:38 christos Exp $ */
/*
* Copyright (C) 1991, 1994 Wolfgang Solfrank.
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: quot.c,v 1.32 2013/06/23 07:28:37 dholland Exp $");
__RCSID("$NetBSD: quot.c,v 1.33 2013/10/19 17:16:38 christos Exp $");
#endif /* not lint */
#include <sys/param.h>
@ -450,7 +450,10 @@ static void
donames(int fd, struct fs *super, const char *name)
{
int c;
ino_t inode, inode1;
ino_t inode;
#ifdef COMPAT
ino_t inode1 = -1;
#endif
ino_t maxino;
union dinode *dp;
@ -459,7 +462,6 @@ donames(int fd, struct fs *super, const char *name)
while ((c = getchar()) != EOF && (c < '0' || c > '9'))
while ((c = getchar()) != EOF && c != '\n');
ungetc(c, stdin);
inode1 = -1;
while (scanf("%" SCNu64, &inode) == 1) {
if (inode > maxino) {
#ifndef COMPAT
@ -483,7 +485,9 @@ donames(int fd, struct fs *super, const char *name)
c = getchar();
}
putchar('\n');
#ifdef COMPAT
inode1 = inode;
#endif
} else {
if (errno)
errx(1, "%s", name);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap_svc.c,v 1.6 2007/05/16 14:42:07 christos Exp $ */
/* $NetBSD: pmap_svc.c,v 1.7 2013/10/19 17:16:38 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -170,7 +170,6 @@ pmapproc_change(struct svc_req *rqstp, SVCXPRT *xprt, unsigned long op)
struct pmap reg;
RPCB rpcbreg;
long ans;
struct sockaddr_in *who;
struct sockcred *sc;
char uidbuf[32];
@ -191,7 +190,7 @@ pmapproc_change(struct svc_req *rqstp, SVCXPRT *xprt, unsigned long op)
return FALSE;
}
who = svc_getcaller(xprt);
(void)svc_getcaller(xprt);
sc = __svc_getcallercreds(xprt);
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpcbind.c,v 1.18 2011/08/31 16:25:00 plunky Exp $ */
/* $NetBSD: rpcbind.c,v 1.19 2013/10/19 17:16:38 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -459,6 +459,8 @@ init_transport(struct netconfig *nconf)
nconf->nc_netid);
}
}
#else
__USE(status);
#endif
/*
* rmtcall only supported on CLTS transports for now.

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtsold.c,v 1.36 2011/08/29 20:38:55 joerg Exp $ */
/* $NetBSD: rtsold.c,v 1.37 2013/10/19 17:16:38 christos Exp $ */
/* $KAME: rtsold.c,v 1.77 2004/01/03 01:35:13 itojun Exp $ */
/*
@ -711,7 +711,7 @@ autoifprobe(void)
static int n = 0;
char **a;
int i, found;
struct ifaddrs *ifap, *ifa, *target;
struct ifaddrs *ifap, *ifa;
/* initialize */
while (n--)
@ -725,7 +725,6 @@ autoifprobe(void)
if (getifaddrs(&ifap) != 0)
return NULL;
target = NULL;
/* find an ethernet */
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
if ((ifa->ifa_flags & IFF_UP) == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: sliplogin.c,v 1.23 2011/08/30 20:42:22 joerg Exp $ */
/* $NetBSD: sliplogin.c,v 1.24 2013/10/19 17:16:38 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\
#if 0
static char sccsid[] = "@(#)sliplogin.c 8.2 (Berkeley) 2/1/94";
#else
__RCSID("$NetBSD: sliplogin.c,v 1.23 2011/08/30 20:42:22 joerg Exp $");
__RCSID("$NetBSD: sliplogin.c,v 1.24 2013/10/19 17:16:38 christos Exp $");
#endif
#endif /* not lint */
@ -120,7 +120,6 @@ findid(const char *name)
static char raddr[16];
static char mask[16];
char user[16];
int n;
(void)strlcpy(loginname, name, sizeof(loginname));
if ((fp = fopen(_PATH_ACCESS, "r")) == NULL) {
@ -130,9 +129,11 @@ findid(const char *name)
while (fgets(loginargs, sizeof(loginargs) - 1, fp)) {
if (ferror(fp))
break;
n = sscanf(loginargs, "%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s\n",
user, laddr, raddr, mask, slopt[0], slopt[1],
slopt[2], slopt[3], slopt[4]);
(void)sscanf(loginargs, "%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]"
"%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s%*[ \t]%15s"
"%*[ \t]%15s\n",
user, laddr, raddr, mask, slopt[0], slopt[1],
slopt[2], slopt[3], slopt[4]);
if (user[0] == '#' || isspace((unsigned char)user[0]))
continue;
if (strcmp(user, name) != 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunlabel.c,v 1.23 2009/04/18 14:06:58 lukem Exp $ */
/* $NetBSD: sunlabel.c,v 1.24 2013/10/19 17:16:38 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: sunlabel.c,v 1.23 2009/04/18 14:06:58 lukem Exp $");
__RCSID("$NetBSD: sunlabel.c,v 1.24 2013/10/19 17:16:38 christos Exp $");
#endif
#include <stdio.h>
@ -926,7 +926,6 @@ static int
print_ascii(struct field *f, int sofar)
{
printf("%s: %.128s\n", f->tag, (char *)f->loc);
sofar = 0;
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mknetid.c,v 1.18 2011/08/30 21:10:28 joerg Exp $ */
/* $NetBSD: mknetid.c,v 1.19 2013/10/19 17:16:38 christos Exp $ */
/*
* Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se>
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mknetid.c,v 1.18 2011/08/30 21:10:28 joerg Exp $");
__RCSID("$NetBSD: mknetid.c,v 1.19 2013/10/19 17:16:38 christos Exp $");
#endif
/*
@ -384,7 +384,7 @@ print_hosts(const char *fname, const char *domain)
{
FILE *hfile;
size_t len;
char *line, *p, *k, *u;
char *line, *p, *u;
if ((hfile = fopen(fname, "r")) == NULL)
err(1, "%s", fname);
@ -397,7 +397,7 @@ print_hosts(const char *fname, const char *domain)
p = line;
/* Find the key, replace trailing whitespace will <NUL> */
for (k = p; *p && isspace((unsigned char)*p) == 0; p++)
for (; *p && isspace((unsigned char)*p) == 0; p++)
;
while (*p && isspace((unsigned char)*p))
*p++ = '\0';