Module Name: src
Committed By: lukem
Date: Tue Apr 14 09:57:38 UTC 2009
Modified Files:
src/usr.bin/ypmatch: ypmatch.c
Log Message:
Fix WARNS=4 issues (-Wcast-qual -Wsign-compare)
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/ypmatch/ypmatch.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.bin/ypmatch/ypmatch.c
diff -u src/usr.bin/ypmatch/ypmatch.c:1.16 src/usr.bin/ypmatch/ypmatch.c:1.17
--- src/usr.bin/ypmatch/ypmatch.c:1.16 Mon Jan 5 23:23:37 2004
+++ src/usr.bin/ypmatch/ypmatch.c Tue Apr 14 09:57:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ypmatch.c,v 1.16 2004/01/05 23:23:37 jmmv Exp $ */
+/* $NetBSD: ypmatch.c,v 1.17 2009/04/14 09:57:38 lukem Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <[email protected]>
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ypmatch.c,v 1.16 2004/01/05 23:23:37 jmmv Exp $");
+__RCSID("$NetBSD: ypmatch.c,v 1.17 2009/04/14 09:57:38 lukem Exp $");
#endif
#include <sys/param.h>
@@ -47,7 +47,7 @@
#include <rpcsvc/ypclnt.h>
const struct ypalias {
- char *alias, *name;
+ const char *alias, *name;
} ypaliases[] = {
{ "passwd", "passwd.byname" },
{ "group", "group.byname" },
@@ -68,9 +68,11 @@
char *argv[];
{
char *domainname;
- char *inkey, *inmap, *outbuf;
+ char *inkey, *outbuf;
+ const char *inmap;
int outbuflen, key, null, notrans;
- int c, r, i, len;
+ int c, r, len;
+ size_t i;
int rval;
domainname = NULL;
@@ -123,8 +125,8 @@
}
rval = 0;
- for(i = 0; i < (argc - 1); i++) {
- inkey = argv[i];
+ for(c = 0; c < (argc - 1); c++) {
+ inkey = argv[c];
len = strlen(inkey);
if (null)