aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-31 04:37:26 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-31 04:37:26 +0800
commit5aa17014deace6d91a5cbb9784a9c05521ba19c8 (patch)
tree50cc56ab2fa7732216e13755112e7ef3735e4241 /tests
parent97f66e2b534e2a54c63360a3f8134a0189c54e25 (diff)
u_int8_t -> uint8_t
Diffstat (limited to 'tests')
-rw-r--r--tests/mtp/mtp_parse_test.c12
-rw-r--r--tests/patching/patching_test.c30
2 files changed, 21 insertions, 21 deletions
diff --git a/tests/mtp/mtp_parse_test.c b/tests/mtp/mtp_parse_test.c
index f1f218b..8e4f533 100644
--- a/tests/mtp/mtp_parse_test.c
+++ b/tests/mtp/mtp_parse_test.c
@@ -10,7 +10,7 @@
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
struct mtp_test {
- const u_int8_t *input;
+ const uint8_t *input;
const u_int16_t length;
struct mtp_level_3_hdr hdr;
@@ -522,7 +522,7 @@ static struct mtp_test tests[] = {
}
};
-static void check_hdr(const u_int8_t *data, const struct mtp_level_3_hdr *t_hdr)
+static void check_hdr(const uint8_t *data, const struct mtp_level_3_hdr *t_hdr)
{
struct mtp_level_3_hdr *hdr;
hdr = (struct mtp_level_3_hdr *) data;
@@ -542,7 +542,7 @@ static void check_hdr(const u_int8_t *data, const struct mtp_level_3_hdr *t_hdr)
abort();
}
-static void check_mng(const u_int8_t *data, const struct mtp_level_3_mng *t_mng)
+static void check_mng(const uint8_t *data, const struct mtp_level_3_mng *t_mng)
{
struct mtp_level_3_hdr *hdr = (struct mtp_level_3_hdr *) data;
struct mtp_level_3_mng *mng = (struct mtp_level_3_mng *) &hdr->data[0];
@@ -560,7 +560,7 @@ static void check_mng(const u_int8_t *data, const struct mtp_level_3_mng *t_mng)
abort();
}
-static void check_prohib(const u_int8_t *data, const struct mtp_level_3_prohib *t_prohib)
+static void check_prohib(const uint8_t *data, const struct mtp_level_3_prohib *t_prohib)
{
struct mtp_level_3_hdr *hdr = (struct mtp_level_3_hdr *) data;
struct mtp_level_3_prohib *prohib = (struct mtp_level_3_prohib *) &hdr->data[0];
@@ -606,9 +606,9 @@ int main(int argc, char **argv)
.mul_ind = 1,
};
- u_int8_t data[] = { 0x03, 0xfe, 0x5b, 0x00, 0x01 };
+ uint8_t data[] = { 0x03, 0xfe, 0x5b, 0x00, 0x01 };
if (memcmp(&prt, data, 5) != 0) {
- u_int8_t *d = (u_int8_t *) &prt;
+ uint8_t *d = (uint8_t *) &prt;
fprintf(stderr, "GOT: 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n",
d[0], d[1], d[2], d[3], d[4]);
abort();
diff --git a/tests/patching/patching_test.c b/tests/patching/patching_test.c
index 8bd0d17..ecbad83 100644
--- a/tests/patching/patching_test.c
+++ b/tests/patching/patching_test.c
@@ -5,39 +5,39 @@
#include <stdio.h>
#include <string.h>
-u_int8_t pkt125[] = {
+uint8_t pkt125[] = {
0x06, 0x01, 0x04,
0x00, 0x00, 0x01, 0x0b, 0x00, 0x09, 0x01, 0x0b,
0x03, 0x01, 0x0b, 0x25, 0x01, 0x00, 0x02 };
-u_int8_t pkt125_res[] = {
+uint8_t pkt125_res[] = {
0x06, 0x01, 0x04,
0x00, 0x00, 0x01, 0x0b, 0x00, 0x09, 0x01, 0x0b,
0x03, 0x01, 0x0a, 0x11, 0x01, 0x00, 0x02 };
-u_int8_t pkt28[] = {
+uint8_t pkt28[] = {
0x06, 0x01, 0x05,
0x2b, 0x00, 0x01, 0x09, 0x00, 0x07, 0x02, 0x21,
0x08, 0x2c, 0x02, 0x40, 0x11 };
-u_int8_t pkt28_res[] = {
+uint8_t pkt28_res[] = {
0x06, 0x01, 0x05,
0x2b, 0x00, 0x01, 0x09, 0x00, 0x07, 0x02, 0x21,
0x09, 0x2c, 0x02, 0x40, 0x25 };
-u_int8_t reset_ack[] = {
+uint8_t reset_ack[] = {
0x09, 0x00, 0x03,
0x07, 0x0b, 0x04, 0x43, 0x0a, 0x00, 0xfe, 0x04,
0x43, 0x5c, 0x00, 0xfe, 0x03, 0x00, 0x01, 0x31 };
-u_int8_t cc[] = {
+uint8_t cc[] = {
0x02, 0x01, 0x04,
0x00, 0x01, 0x01, 0xb4, 0x02, 0x01, 0x00 };
struct result {
- u_int8_t *input;
+ uint8_t *input;
int inp_len;
- const u_int8_t *expected;
+ const uint8_t *expected;
int exp_len;
int result;
};
@@ -75,14 +75,14 @@ static struct result results[] = {
},
};
-static u_int8_t udt_with_poi[] = {
+static uint8_t udt_with_poi[] = {
0x09, 0x00, 0x03,
0x07, 0x0b, 0x04, 0x43, 0x0a, 0x00, 0xfe, 0x04,
0x43, 0x5c, 0x00, 0xfe, 0x10, 0x00, 0x0e, 0x44,
0x04, 0x01, 0x00, 0x01, 0x00, 0x01, 0x1e, 0x05,
0x1e, 0x00, 0x00, 0x00, 0x40 };
-static const u_int8_t udt_without_poi[] = {
+static const uint8_t udt_without_poi[] = {
0x09, 0x00, 0x03,
0x05, 0x07, 0x02, 0x42, 0xfe,
0x02, 0x42, 0xfe,
@@ -90,7 +90,7 @@ static const u_int8_t udt_without_poi[] = {
0x04, 0x01, 0x00, 0x01, 0x00, 0x01, 0x1e, 0x05,
0x1e, 0x00, 0x00, 0x00, 0x40 };
-static u_int8_t cr_with_poi [] = {
+static uint8_t cr_with_poi [] = {
0x01, 0x01, 0x04,
0x00, 0x02, 0x02, 0x06, 0x04, 0xc3, 0x5c, 0x00,
0xfe, 0x0f, 0x21, 0x00, 0x1f, 0x57, 0x05, 0x08,
@@ -99,7 +99,7 @@ static u_int8_t cr_with_poi [] = {
0x81, 0x08, 0x29, 0x47, 0x80, 0x00, 0x00, 0x00,
0x00, 0x80, 0x21, 0x01, 0x00 };
-static const u_int8_t cr_without_poi [] = {
+static const uint8_t cr_without_poi [] = {
0x01, 0x01, 0x04,
0x00, 0x02, 0x02, 0x04, 0x02, 0x42, 0xfe,
0x0f, 0x21, 0x00, 0x1f, 0x57, 0x05, 0x08,
@@ -108,7 +108,7 @@ static const u_int8_t cr_without_poi [] = {
0x81, 0x08, 0x29, 0x47, 0x80, 0x00, 0x00, 0x00,
0x00, 0x80, 0x21, 0x01, 0x00 };
-static u_int8_t cr2_without_poi[] = {
+static uint8_t cr2_without_poi[] = {
0x01, 0x00, 0x00, 0x03, 0x02, 0x02, 0x04, 0x02,
0x42, 0xfe, 0x0f, 0x1f, 0x00, 0x1d, 0x57, 0x05,
0x08, 0x00, 0x72, 0xf4, 0x80, 0x20, 0x1d, 0xc3,
@@ -140,12 +140,12 @@ static struct result rewrite_results_to_msc[] = {
};
-u_int8_t paging_cmd[] = {
+uint8_t paging_cmd[] = {
0x09, 0x00, 0x03, 0x07, 0x0b, 0x04, 0x43, 0x0a,
0x00, 0xfe, 0x04, 0x43, 0x5c, 0x00, 0xfe, 0x10,
0x00, 0x0e, 0x52, 0x08, 0x08, 0x29, 0x80, 0x10,
0x76, 0x10, 0x77, 0x46, 0x05, 0x1a, 0x01, 0x06 };
-u_int8_t paging_cmd_patched[] = {
+uint8_t paging_cmd_patched[] = {
0x09, 0x00, 0x03, 0x07, 0x0b, 0x04, 0x43, 0x02,
0x00, 0xfe, 0x04, 0x43, 0x01, 0x00, 0xfe, 0x10,
0x00, 0x0e, 0x52, 0x08, 0x08, 0x29, 0x80, 0x10,