Module Name: src
Committed By: lukem
Date: Sat Apr 18 12:57:10 UTC 2009
Modified Files:
src/usr.sbin/rpc.bootparamd: bootparamd.c
Log Message:
Fix -Wshadow and -Wcast-qual issues
To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/rpc.bootparamd/bootparamd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/rpc.bootparamd/bootparamd.c
diff -u src/usr.sbin/rpc.bootparamd/bootparamd.c:1.44 src/usr.sbin/rpc.bootparamd/bootparamd.c:1.45
--- src/usr.sbin/rpc.bootparamd/bootparamd.c:1.44 Sat Oct 30 15:23:30 2004
+++ src/usr.sbin/rpc.bootparamd/bootparamd.c Sat Apr 18 12:57:10 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bootparamd.c,v 1.44 2004/10/30 15:23:30 dsl Exp $ */
+/* $NetBSD: bootparamd.c,v 1.45 2009/04/18 12:57:10 lukem Exp $ */
/*
* This code is not copyright, and is placed in the public domain.
@@ -11,7 +11,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: bootparamd.c,v 1.44 2004/10/30 15:23:30 dsl Exp $");
+__RCSID("$NetBSD: bootparamd.c,v 1.45 2009/04/18 12:57:10 lukem Exp $");
#endif
#include <sys/types.h>
@@ -61,7 +61,7 @@
int dolog = 0;
struct in_addr route_addr;
struct sockaddr_in my_addr;
-char *bootpfile = _PATH_BOOTPARAMS;
+const char *bootpfile = _PATH_BOOTPARAMS;
char *iface = NULL;
int main __P((int, char *[]));
@@ -234,7 +234,7 @@
{
static bp_getfile_res res;
struct hostent *he;
- int err;
+ int error;
if (debug)
warnx("getfile got question for \"%s\" and file \"%s\"",
@@ -258,9 +258,9 @@
}
(void)strlcpy(askname, he->h_name, sizeof(askname));
- err = lookup_bootparam(askname, NULL, getfile->file_id,
+ error = lookup_bootparam(askname, NULL, getfile->file_id,
&res.server_name, &res.server_path);
- if (err == 0) {
+ if (error == 0) {
he = gethostbyname(res.server_name);
if (!he) {
if (debug)
@@ -276,7 +276,7 @@
memmove(&res.server_address.bp_address_u.ip_addr,
he->h_addr, 4);
res.server_address.address_type = IP_ADDR_TYPE;
- } else if (err == ENOENT && !strcmp(getfile->file_id, "dump")) {
+ } else if (error == ENOENT && !strcmp(getfile->file_id, "dump")) {
/* Special for dump, answer with null strings. */
res.server_name[0] = '\0';
res.server_path[0] = '\0';