Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/mtree mtree: use POSIX type uint32_t instead of u_i...



details:   https://anonhg.NetBSD.org/src/rev/b16144e7fdf3
branches:  trunk
changeset: 1019667:b16144e7fdf3
user:      cheusov <cheusov%NetBSD.org@localhost>
date:      Thu Mar 18 20:02:18 2021 +0000

description:
mtree: use POSIX type uint32_t instead of u_int32_t

diffstat:

 usr.sbin/mtree/compare.c |   6 +++---
 usr.sbin/mtree/crc.c     |  14 +++++++-------
 usr.sbin/mtree/extern.h  |   6 +++---
 usr.sbin/mtree/verify.c  |   6 +++---
 4 files changed, 16 insertions(+), 16 deletions(-)

diffs (128 lines):

diff -r 15fd1764e3b7 -r b16144e7fdf3 usr.sbin/mtree/compare.c
--- a/usr.sbin/mtree/compare.c  Thu Mar 18 19:47:41 2021 +0000
+++ b/usr.sbin/mtree/compare.c  Thu Mar 18 20:02:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $    */
+/*     $NetBSD: compare.c,v 1.59 2021/03/18 20:02:18 cheusov Exp $     */
 
 /*-
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)compare.c  8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $");
+__RCSID("$NetBSD: compare.c,v 1.59 2021/03/18 20:02:18 cheusov Exp $");
 #endif
 #endif /* not lint */
 
@@ -135,7 +135,7 @@
 int
 compare(NODE *s, FTSENT *p)
 {
-       u_int32_t len, val, flags;
+       uint32_t len, val, flags;
        int fd, label;
        const char *cp, *tab;
 #if !defined(NO_MD5) || !defined(NO_RMD160) || !defined(NO_SHA1) || !defined(NO_SHA2)
diff -r 15fd1764e3b7 -r b16144e7fdf3 usr.sbin/mtree/crc.c
--- a/usr.sbin/mtree/crc.c      Thu Mar 18 19:47:41 2021 +0000
+++ b/usr.sbin/mtree/crc.c      Thu Mar 18 20:02:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crc.c,v 1.9 2012/10/05 00:40:51 christos Exp $ */
+/*     $NetBSD: crc.c,v 1.10 2021/03/18 20:02:18 cheusov Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)crc.c      8.1 (Berkeley) 6/17/93";
 #else
-__RCSID("$NetBSD: crc.c,v 1.9 2012/10/05 00:40:51 christos Exp $");
+__RCSID("$NetBSD: crc.c,v 1.10 2021/03/18 20:02:18 cheusov Exp $");
 #endif
 #endif /* not lint */
 
@@ -53,7 +53,7 @@
 
 #include "extern.h"
 
-static const u_int32_t crctab[] = {
+static const uint32_t crctab[] = {
        0x0,
        0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
        0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
@@ -114,15 +114,15 @@
  * locations to store the crc and the number of bytes read.  It returns 0 on
  * success and 1 on failure.  Errno is set on failure.
  */
-u_int32_t crc_total = ~0;              /* The crc over a number of files. */
+uint32_t crc_total = ~0;               /* The crc over a number of files. */
 
 int
-crc(int fd, u_int32_t *cval, u_int32_t *clen)
+crc(int fd, uint32_t *cval, uint32_t *clen)
 {
        u_char *p;
        int nr;
-       u_int32_t thecrc, len;
-       u_int32_t crctot;
+       uint32_t thecrc, len;
+       uint32_t crctot;
        u_char buf[16 * 1024];
 
 #define        COMPUTE(var, ch)        (var) = (var) << 8 ^ crctab[(var) >> 24 ^ (ch)]
diff -r 15fd1764e3b7 -r b16144e7fdf3 usr.sbin/mtree/extern.h
--- a/usr.sbin/mtree/extern.h   Thu Mar 18 19:47:41 2021 +0000
+++ b/usr.sbin/mtree/extern.h   Thu Mar 18 20:02:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.39 2014/04/24 17:22:41 christos Exp $     */
+/*     $NetBSD: extern.h,v 1.40 2021/03/18 20:02:18 cheusov Exp $      */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -62,7 +62,7 @@
 void    addtag(slist_t *, char *);
 int     check_excludes(const char *, const char *);
 int     compare(NODE *, FTSENT *);
-int     crc(int, u_int32_t *, u_int32_t *);
+int     crc(int, uint32_t *, uint32_t *);
 void    cwalk(FILE *);
 void    dump_nodes(FILE *, const char *, NODE *, int);
 void    init_excludes(void);
@@ -83,7 +83,7 @@
 extern int     mtree_Mflag, mtree_Sflag, mtree_Wflag;
 extern size_t  mtree_lineno;
 extern enum flavor     flavor;
-extern u_int32_t crc_total;
+extern uint32_t crc_total;
 extern int     ftsoptions, keys;
 extern char    fullpath[];
 extern slist_t includetags, excludetags;
diff -r 15fd1764e3b7 -r b16144e7fdf3 usr.sbin/mtree/verify.c
--- a/usr.sbin/mtree/verify.c   Thu Mar 18 19:47:41 2021 +0000
+++ b/usr.sbin/mtree/verify.c   Thu Mar 18 20:02:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: verify.c,v 1.46 2015/01/23 20:28:24 christos Exp $     */
+/*     $NetBSD: verify.c,v 1.47 2021/03/18 20:02:18 cheusov Exp $      */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)verify.c   8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: verify.c,v 1.46 2015/01/23 20:28:24 christos Exp $");
+__RCSID("$NetBSD: verify.c,v 1.47 2021/03/18 20:02:18 cheusov Exp $");
 #endif
 #endif /* not lint */
 
@@ -178,7 +178,7 @@
        int create;
        char *tp;
        const char *type;
-       u_int32_t flags;
+       uint32_t flags;
 
        for (; p; p = p->next) {
                if (p->flags & F_OPT && !(p->flags & F_VISIT))



Home | Main Index | Thread Index | Old Index