Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/dev_mkdb - Cosmetic changes like:



details:   https://anonhg.NetBSD.org/src/rev/5f2abc505359
branches:  trunk
changeset: 508345:5f2abc505359
user:      enami <enami%NetBSD.org@localhost>
date:      Tue Apr 10 06:08:12 2001 +0000

description:
- Cosmetic changes like:
        * Put space after keyword `switch'.
        * Explicitly dereference pointer to function.
- Remove unnecessary cast.

diffstat:

 usr.sbin/dev_mkdb/dev_mkdb.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (43 lines):

diff -r 59051deee8c8 -r 5f2abc505359 usr.sbin/dev_mkdb/dev_mkdb.c
--- a/usr.sbin/dev_mkdb/dev_mkdb.c      Tue Apr 10 05:56:25 2001 +0000
+++ b/usr.sbin/dev_mkdb/dev_mkdb.c      Tue Apr 10 06:08:12 2001 +0000
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "from: @(#)dev_mkdb.c   8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: dev_mkdb.c,v 1.8 1997/10/18 08:18:00 lukem Exp $");
+__RCSID("$NetBSD: dev_mkdb.c,v 1.9 2001/04/10 06:08:12 enami Exp $");
 #endif
 #endif /* not lint */
 
@@ -61,7 +61,7 @@
 #include <string.h>
 #include <unistd.h>
 
-int    main __P((int, char **));
+int    main __P((int, char *[]));
 void   usage __P((void));
 
 int
@@ -83,7 +83,7 @@
        char dbtmp[MAXPATHLEN + 1], dbname[MAXPATHLEN + 1];
 
        while ((ch = getopt(argc, argv, "")) != -1)
-               switch((char)ch) {
+               switch (ch) {
                case '?':
                default:
                        usage();
@@ -138,10 +138,10 @@
                memmove(buf, dp->d_name, dp->d_namlen);
                buf[dp->d_namlen] = '\0';
                data.size = dp->d_namlen + 1;
-               if ((db->put)(db, &key, &data, 0))
+               if ((*db->put)(db, &key, &data, 0))
                        err(1, "dbput %s", dbtmp);
        }
-       (void)(db->close)(db);
+       (void)(*db->close)(db);
        if (rename(dbtmp, dbname))
                err(1, "rename %s to %s", dbtmp, dbname);
        exit(0);



Home | Main Index | Thread Index | Old Index