mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-26 16:18:31 +00:00
Unexpand be32dec().
MFC after: 2 weeks
This commit is contained in:
parent
33e4f8169d
commit
12d62cc2d7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348381
@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$");
|
||||
* Stand-alone ZFS file reader.
|
||||
*/
|
||||
|
||||
#include <sys/endian.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/stdint.h>
|
||||
|
||||
@ -128,10 +129,7 @@ zfs_free(void *ptr, size_t size)
|
||||
static int
|
||||
xdr_int(const unsigned char **xdr, int *ip)
|
||||
{
|
||||
*ip = ((*xdr)[0] << 24)
|
||||
| ((*xdr)[1] << 16)
|
||||
| ((*xdr)[2] << 8)
|
||||
| ((*xdr)[3] << 0);
|
||||
*ip = be32dec(*xdr);
|
||||
(*xdr) += 4;
|
||||
return (0);
|
||||
}
|
||||
@ -139,10 +137,7 @@ xdr_int(const unsigned char **xdr, int *ip)
|
||||
static int
|
||||
xdr_u_int(const unsigned char **xdr, u_int *ip)
|
||||
{
|
||||
*ip = ((*xdr)[0] << 24)
|
||||
| ((*xdr)[1] << 16)
|
||||
| ((*xdr)[2] << 8)
|
||||
| ((*xdr)[3] << 0);
|
||||
*ip = be32dec(*xdr);
|
||||
(*xdr) += 4;
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user