mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
lib:util: Use _DATA_BYTE(_CONST) from bytearray.h
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
8a87fdb4a7
commit
841e243625
@ -20,6 +20,8 @@
|
||||
#ifndef _BYTEORDER_H
|
||||
#define _BYTEORDER_H
|
||||
|
||||
#include "bytearray.h"
|
||||
|
||||
/*
|
||||
This file implements macros for machine independent short and
|
||||
int manipulation
|
||||
@ -88,8 +90,8 @@ it also defines lots of intermediate macros, just ignore those :-)
|
||||
*/
|
||||
|
||||
|
||||
#define CVAL(buf,pos) ((unsigned int)(((const uint8_t *)(buf))[pos]))
|
||||
#define CVAL_NC(buf,pos) (((uint8_t *)(buf))[pos]) /* Non-const version of CVAL */
|
||||
#define CVAL(buf,pos) ((uint32_t)_DATA_BYTE_CONST(buf, pos))
|
||||
#define CVAL_NC(buf,pos) _DATA_BYTE(buf, pos) /* Non-const version of CVAL */
|
||||
#define PVAL(buf,pos) (CVAL(buf,pos))
|
||||
#define SCVAL(buf,pos,val) (CVAL_NC(buf,pos) = (val))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user