summaryrefslogtreecommitdiff
path: root/source4/libcli/util
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-05-25 17:50:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:16 -0500
commitfcd718c7d8a6850ae8719f23ed044b06b57501cd (patch)
tree78fe8265d44c4644b01963784a37f4505785fb97 /source4/libcli/util
parentf88bf54c7f6d1c2ef833047eb8327953c304b5ff (diff)
downloadsamba-fcd718c7d8a6850ae8719f23ed044b06b57501cd.tar.gz
samba-fcd718c7d8a6850ae8719f23ed044b06b57501cd.tar.bz2
samba-fcd718c7d8a6850ae8719f23ed044b06b57501cd.zip
r890: convert samba4 to use [u]int8_t instead of [u]int8
metze (This used to be commit 2986c5f08c8f0c26a2ea7b6ce20aae025183109f)
Diffstat (limited to 'source4/libcli/util')
-rw-r--r--source4/libcli/util/asn1.c26
-rw-r--r--source4/libcli/util/clierror.c2
-rw-r--r--source4/libcli/util/errormap.c8
-rw-r--r--source4/libcli/util/smbencrypt.c6
-rw-r--r--source4/libcli/util/smberr.c4
5 files changed, 23 insertions, 23 deletions
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index 07c692f700..b44c62bc50 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -31,7 +31,7 @@ BOOL asn1_write(ASN1_DATA *data, const void *p, int len)
{
if (data->has_error) return False;
if (data->length < data->ofs+len) {
- uint8 *newp;
+ uint8_t *newp;
newp = Realloc(data->data, data->ofs+len);
if (!newp) {
SAFE_FREE(data->data);
@@ -46,14 +46,14 @@ BOOL asn1_write(ASN1_DATA *data, const void *p, int len)
return True;
}
-/* useful fn for writing a uint8 */
-BOOL asn1_write_uint8(ASN1_DATA *data, uint8 v)
+/* useful fn for writing a uint8_t */
+BOOL asn1_write_uint8(ASN1_DATA *data, uint8_t v)
{
return asn1_write(data, &v, 1);
}
/* push a tag onto the asn1 data buffer. Used for nested structures */
-BOOL asn1_push_tag(ASN1_DATA *data, uint8 tag)
+BOOL asn1_push_tag(ASN1_DATA *data, uint8_t tag)
{
struct nesting *nesting;
@@ -187,7 +187,7 @@ BOOL asn1_write_BOOLEAN2(ASN1_DATA *data, BOOL v)
/* check a BOOLEAN */
BOOL asn1_check_BOOLEAN(ASN1_DATA *data, BOOL v)
{
- uint8 b = 0;
+ uint8_t b = 0;
asn1_read_uint8(data, &b);
if (b != ASN1_BOOLEAN) {
@@ -228,16 +228,16 @@ BOOL asn1_read(ASN1_DATA *data, void *p, int len)
return True;
}
-/* read a uint8 from a ASN1 buffer */
-BOOL asn1_read_uint8(ASN1_DATA *data, uint8 *v)
+/* read a uint8_t from a ASN1 buffer */
+BOOL asn1_read_uint8(ASN1_DATA *data, uint8_t *v)
{
return asn1_read(data, v, 1);
}
/* start reading a nested asn1 structure */
-BOOL asn1_start_tag(ASN1_DATA *data, uint8 tag)
+BOOL asn1_start_tag(ASN1_DATA *data, uint8_t tag)
{
- uint8 b;
+ uint8_t b;
struct nesting *nesting;
if (!asn1_read_uint8(data, &b))
@@ -314,7 +314,7 @@ int asn1_tag_remaining(ASN1_DATA *data)
/* read an object ID from a ASN1 buffer */
BOOL asn1_read_OID(ASN1_DATA *data, char **OID)
{
- uint8 b;
+ uint8_t b;
pstring aoid;
fstring el;
@@ -392,7 +392,7 @@ BOOL asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob)
/* read an interger */
BOOL asn1_read_Integer(ASN1_DATA *data, int *i)
{
- uint8 b;
+ uint8_t b;
*i = 0;
if (!asn1_start_tag(data, ASN1_INTEGER)) return False;
@@ -407,7 +407,7 @@ BOOL asn1_read_Integer(ASN1_DATA *data, int *i)
/* check a enumarted value is correct */
BOOL asn1_check_enumerated(ASN1_DATA *data, int v)
{
- uint8 b;
+ uint8_t b;
if (!asn1_start_tag(data, ASN1_ENUMERATED)) return False;
asn1_read_uint8(data, &b);
asn1_end_tag(data);
@@ -419,7 +419,7 @@ BOOL asn1_check_enumerated(ASN1_DATA *data, int v)
}
/* write an enumarted value to the stream */
-BOOL asn1_write_enumerated(ASN1_DATA *data, uint8 v)
+BOOL asn1_write_enumerated(ASN1_DATA *data, uint8_t v)
{
if (!asn1_push_tag(data, ASN1_ENUMERATED)) return False;
asn1_write_uint8(data, v);
diff --git a/source4/libcli/util/clierror.c b/source4/libcli/util/clierror.c
index 7b78d191dd..d852cd0d21 100644
--- a/source4/libcli/util/clierror.c
+++ b/source4/libcli/util/clierror.c
@@ -75,7 +75,7 @@ NTSTATUS cli_nt_error(struct cli_tree *tree)
/* Return the DOS error from the last packet - an error class and an error
code. */
-void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32_t *ecode)
+void cli_dos_error(struct cli_state *cli, uint8_t *eclass, uint32_t *ecode)
{
if (cli->transport->error.etype == ETYPE_DOS) {
ntstatus_to_dos(cli->transport->error.e.nt_status,
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 11a07d45c7..46290baa7c 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -46,7 +46,7 @@
/* NT status -> dos error map */
static const struct {
- uint8 dos_class;
+ uint8_t dos_class;
uint32_t dos_code;
NTSTATUS ntstatus;
} ntstatus_to_dos_map[] = {
@@ -612,7 +612,7 @@ static const struct {
/* dos -> nt status error map */
static const struct {
- uint8 dos_class;
+ uint8_t dos_class;
uint32_t dos_code;
NTSTATUS ntstatus;
} dos_to_ntstatus_map[] = {
@@ -1410,7 +1410,7 @@ static const struct {
/*****************************************************************************
convert a dos eclas/ecode to a NT status32 code
*****************************************************************************/
-NTSTATUS dos_to_ntstatus(uint8 eclass, uint32_t ecode)
+NTSTATUS dos_to_ntstatus(uint8_t eclass, uint32_t ecode)
{
int i;
if (eclass == 0 && ecode == 0) return NT_STATUS_OK;
@@ -1427,7 +1427,7 @@ NTSTATUS dos_to_ntstatus(uint8 eclass, uint32_t ecode)
/*****************************************************************************
convert a NT status code to a dos class/code
*****************************************************************************/
-void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32_t *ecode)
+void ntstatus_to_dos(NTSTATUS ntstatus, uint8_t *eclass, uint32_t *ecode)
{
int i;
if (NT_STATUS_IS_OK(ntstatus)) {
diff --git a/source4/libcli/util/smbencrypt.c b/source4/libcli/util/smbencrypt.c
index fa29059585..5b210394c1 100644
--- a/source4/libcli/util/smbencrypt.c
+++ b/source4/libcli/util/smbencrypt.c
@@ -239,7 +239,7 @@ void SMBOWFencrypt_ntv2(const uchar kr[16],
}
void SMBsesskeygen_ntv2(const uchar kr[16],
- const uchar * nt_resp, uint8 sess_key[16])
+ const uchar * nt_resp, uint8_t sess_key[16])
{
/* a very nice, 128 bit, variable session key */
@@ -255,7 +255,7 @@ void SMBsesskeygen_ntv2(const uchar kr[16],
#endif
}
-void SMBsesskeygen_ntv1(const uchar kr[16], uint8 sess_key[16])
+void SMBsesskeygen_ntv1(const uchar kr[16], uint8_t sess_key[16])
{
/* yes, this session key does not change - yes, this
is a problem - but it is 128 bits */
@@ -270,7 +270,7 @@ void SMBsesskeygen_ntv1(const uchar kr[16], uint8 sess_key[16])
void SMBsesskeygen_lm_sess_key(const uchar lm_hash[16],
const uchar lm_resp[24], /* only uses 8 */
- uint8 sess_key[16])
+ uint8_t sess_key[16])
{
/* Calculate the LM session key (effective length 40 bits,
but changes with each session) */
diff --git a/source4/libcli/util/smberr.c b/source4/libcli/util/smberr.c
index 577308a7c0..87cc601b8d 100644
--- a/source4/libcli/util/smberr.c
+++ b/source4/libcli/util/smberr.c
@@ -128,7 +128,7 @@ static const struct err_code_struct hard_msgs[] = {
static const struct {
- uint8 class;
+ uint8_t class;
const char *class_name;
const struct err_code_struct *err_msgs;
} err_classes[] = {
@@ -145,7 +145,7 @@ static const struct {
/* return a dos error string given a error class and error code */
-const char *dos_errstr(uint8 class, uint16_t code)
+const char *dos_errstr(uint8_t class, uint16_t code)
{
static char *msg;
int i, j;