Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ufs convert ufs_rw{16, 32, 64}() into real inline func...
details: https://anonhg.NetBSD.org/src/rev/3d8e0a540fb5
branches: trunk
changeset: 790723:3d8e0a540fb5
user: mrg <mrg%NetBSD.org@localhost>
date: Sat Oct 19 20:12:18 2013 +0000
description:
convert ufs_rw{16,32,64}() into real inline functions in all cases,
so that they consume their second arguments properly.
diffstat:
sys/ufs/ufs/ufs_bswap.h | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r e863d186975d -r 3d8e0a540fb5 sys/ufs/ufs/ufs_bswap.h
--- a/sys/ufs/ufs/ufs_bswap.h Sat Oct 19 19:59:05 2013 +0000
+++ b/sys/ufs/ufs/ufs_bswap.h Sat Oct 19 20:12:18 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_bswap.h,v 1.19 2009/10/19 18:41:17 bouyer Exp $ */
+/* $NetBSD: ufs_bswap.h,v 1.20 2013/10/19 20:12:18 mrg Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer.
@@ -65,9 +65,23 @@
return ((ns) ? bswap64(a) : (a));
}
#else
-#define ufs_rw16(a, ns) ((uint16_t)(a))
-#define ufs_rw32(a, ns) ((uint32_t)(a))
-#define ufs_rw64(a, ns) ((uint64_t)(a))
+static inline u_int16_t
+ufs_rw16(uint16_t a, int ns)
+{
+ return a;
+}
+
+static inline u_int32_t
+ufs_rw32(uint32_t a, int ns)
+{
+ return a;
+}
+
+static inline u_int64_t
+ufs_rw64(uint64_t a, int ns)
+{
+ return a;
+}
#endif
#define ufs_add16(a, b, ns) \
Home |
Main Index |
Thread Index |
Old Index