Module Name:    src
Committed By:   lukem
Date:           Sat Apr 18 05:09:16 UTC 2009

Modified Files:
        src/usr.sbin/netgroup_mkdb: netgroup_mkdb.c

Log Message:
Fix -Wcast-qual issues


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/netgroup_mkdb/netgroup_mkdb.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/netgroup_mkdb/netgroup_mkdb.c
diff -u src/usr.sbin/netgroup_mkdb/netgroup_mkdb.c:1.16 src/usr.sbin/netgroup_mkdb/netgroup_mkdb.c:1.17
--- src/usr.sbin/netgroup_mkdb/netgroup_mkdb.c:1.16	Sat Dec 15 19:44:56 2007
+++ src/usr.sbin/netgroup_mkdb/netgroup_mkdb.c	Sat Apr 18 05:09:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: netgroup_mkdb.c,v 1.16 2007/12/15 19:44:56 perry Exp $	*/
+/*	$NetBSD: netgroup_mkdb.c,v 1.17 2009/04/18 05:09:15 lukem Exp $	*/
 
 /*
  * Copyright (c) 1994 Christos Zoulas
@@ -32,7 +32,7 @@
  */
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: netgroup_mkdb.c,v 1.16 2007/12/15 19:44:56 perry Exp $");
+__RCSID("$NetBSD: netgroup_mkdb.c,v 1.17 2009/04/18 05:09:15 lukem Exp $");
 #endif
 
 #include <sys/types.h>
@@ -95,7 +95,7 @@
 static const char ng_empty[] = "";
 #define NG_EMPTY(a)	((a) ? (a) : ng_empty)
 
-static char    *dbname = _PATH_NETGROUP_DB;
+static const char *dbname = _PATH_NETGROUP_DB;
 
 int
 main(int argc, char **argv)
@@ -103,7 +103,7 @@
 	DB		 *db, *ndb, *hdb, *udb;
 	int               ch;
 	char		  buf[MAXPATHLEN];
-	char		 *fname = _PATH_NETGROUP;
+	const char	 *fname = _PATH_NETGROUP;
 
 
 	while ((ch = getopt(argc, argv, "dDo:")) != -1)
@@ -315,7 +315,7 @@
 	DB             *xdb = NULL;
 	DBT             key, data;
 
-	key.data = (u_char *)name;
+	key.data = __UNCONST(name);
 	key.size = strlen(name) + 1;
 
 	switch ((db->get)(db, &key, &data, 0)) {

Reply via email to