convert ufs_rw{16,32,64}() into real inline functions in all cases,

so that they consume their second arguments properly.
This commit is contained in:
mrg 2013-10-19 20:12:18 +00:00
parent 1cfe8e1462
commit 34287b30e3
1 changed files with 18 additions and 4 deletions

View File

@ -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 @@ ufs_rw64(uint64_t a, int ns)
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) \