Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ufs ufs_rwXX: cast to unsigned even without FFS_EI t...



details:   https://anonhg.NetBSD.org/src/rev/4827613416de
branches:  trunk
changeset: 545800:4827613416de
user:      yamt <yamt%NetBSD.org@localhost>
date:      Wed Apr 16 14:27:03 2003 +0000

description:
ufs_rwXX: cast to unsigned even without FFS_EI to avoid
possible nasty signed vs unsigned problems.

diffstat:

 sys/ufs/ufs/ufs_bswap.h |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (22 lines):

diff -r b82244db52b1 -r 4827613416de sys/ufs/ufs/ufs_bswap.h
--- a/sys/ufs/ufs/ufs_bswap.h   Wed Apr 16 14:23:11 2003 +0000
+++ b/sys/ufs/ufs/ufs_bswap.h   Wed Apr 16 14:27:03 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_bswap.h,v 1.11 2002/12/01 00:12:12 matt Exp $      */
+/*     $NetBSD: ufs_bswap.h,v 1.12 2003/04/16 14:27:03 yamt Exp $      */
 
 /*
  * Copyright (c) 1998 Manuel Bouyer.
@@ -80,9 +80,9 @@
        return ((ns) ?  bswap64(a) : (a));
 }
 #else
-#define ufs_rw16(a, ns) (a)
-#define ufs_rw32(a, ns) (a)
-#define ufs_rw64(a, ns) (a)
+#define ufs_rw16(a, ns) ((uint16_t)(a))
+#define ufs_rw32(a, ns) ((uint32_t)(a))
+#define ufs_rw64(a, ns) ((uint64_t)(a))
 #endif
 
 #define ufs_add16(a, b, ns) \



Home | Main Index | Thread Index | Old Index