From c42ad8b68619b58bfbc98a0409d74a86b603aebf Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 18 Apr 2011 17:04:00 +0200 Subject: misc: Move from u_int to uint types of stdint.h This was done with sed on the files. --- openbsc/src/libabis/input/dahdi.c | 12 ++++++------ openbsc/src/libabis/input/hsl.c | 2 +- openbsc/src/libabis/input/ipaccess.c | 28 ++++++++++++++-------------- openbsc/src/libabis/input/misdn.c | 4 ++-- 4 files changed, 23 insertions(+), 23 deletions(-) (limited to 'openbsc/src/libabis/input') diff --git a/openbsc/src/libabis/input/dahdi.c b/openbsc/src/libabis/input/dahdi.c index 2754944f7..22c96551c 100644 --- a/openbsc/src/libabis/input/dahdi.c +++ b/openbsc/src/libabis/input/dahdi.c @@ -231,14 +231,14 @@ static int handle_ts1_write(struct bsc_fd *bfd) static int invertbits = 1; -static u_int8_t flip_table[256]; +static uint8_t flip_table[256]; static void init_flip_bits(void) { int i,k; for (i = 0 ; i < 256 ; i++) { - u_int8_t sample = 0 ; + uint8_t sample = 0 ; for (k = 0; k<8; k++) { if ( i & 1 << k ) sample |= 0x80 >> k; } @@ -246,13 +246,13 @@ static void init_flip_bits(void) } } -static u_int8_t * flip_buf_bits ( u_int8_t * buf , int len) +static uint8_t * flip_buf_bits ( uint8_t * buf , int len) { int i; - u_int8_t * start = buf; + uint8_t * start = buf; for (i = 0 ; i < len; i++) { - buf[i] = flip_table[(u_int8_t)buf[i]]; + buf[i] = flip_table[(uint8_t)buf[i]]; } return start; @@ -265,7 +265,7 @@ static int handle_tsX_write(struct bsc_fd *bfd) struct e1inp_line *line = bfd->data; unsigned int ts_nr = bfd->priv_nr; struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; - u_int8_t tx_buf[D_BCHAN_TX_GRAN]; + uint8_t tx_buf[D_BCHAN_TX_GRAN]; struct subch_mux *mx = &e1i_ts->trau.mux; int ret; diff --git a/openbsc/src/libabis/input/hsl.c b/openbsc/src/libabis/input/hsl.c index 2b9ab1d1e..c53fd0f47 100644 --- a/openbsc/src/libabis/input/hsl.c +++ b/openbsc/src/libabis/input/hsl.c @@ -298,7 +298,7 @@ static int handle_ts1_write(struct bsc_fd *bfd) struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; struct e1inp_sign_link *sign_link; struct msgb *msg; - u_int8_t proto; + uint8_t proto; int ret; bfd->when &= ~BSC_FD_WRITE; diff --git a/openbsc/src/libabis/input/ipaccess.c b/openbsc/src/libabis/input/ipaccess.c index cba03a0bb..f4f95f2ba 100644 --- a/openbsc/src/libabis/input/ipaccess.c +++ b/openbsc/src/libabis/input/ipaccess.c @@ -68,15 +68,15 @@ static struct ia_e1_handle *e1h; * - ID_REQUEST: first messages once OML has been established. * - ID_ACK: in reply to ID_ACK. */ -const u_int8_t ipa_pong_msg[] = { +const uint8_t ipa_pong_msg[] = { 0, 1, IPAC_PROTO_IPACCESS, IPAC_MSGT_PONG }; -const u_int8_t ipa_id_ack_msg[] = { +const uint8_t ipa_id_ack_msg[] = { 0, 1, IPAC_PROTO_IPACCESS, IPAC_MSGT_ID_ACK }; -const u_int8_t ipa_id_req_msg[] = { +const uint8_t ipa_id_req_msg[] = { 0, 17, IPAC_PROTO_IPACCESS, IPAC_MSGT_ID_GET, 0x01, IPAC_IDTAG_UNIT, 0x01, IPAC_IDTAG_MACADDR, @@ -110,9 +110,9 @@ const char *ipaccess_idtag_name(uint8_t tag) int ipaccess_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len) { - u_int8_t t_len; - u_int8_t t_tag; - u_int8_t *cur = buf; + uint8_t t_len; + uint8_t t_tag; + uint8_t *cur = buf; memset(dec, 0, sizeof(*dec)); @@ -138,7 +138,7 @@ int ipaccess_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len) } struct gsm_bts *find_bts_by_unitid(struct gsm_network *net, - u_int16_t site_id, u_int16_t bts_id) + uint16_t site_id, uint16_t bts_id) { struct gsm_bts *bts; @@ -155,8 +155,8 @@ struct gsm_bts *find_bts_by_unitid(struct gsm_network *net, return NULL; } -int ipaccess_parse_unitid(const char *str, u_int16_t *site_id, - u_int16_t *bts_id, u_int16_t *trx_id) +int ipaccess_parse_unitid(const char *str, uint16_t *site_id, + uint16_t *bts_id, uint16_t *trx_id) { unsigned long ul; char *endptr; @@ -225,7 +225,7 @@ int ipaccess_send_id_req(int fd) int ipaccess_rcvmsg_base(struct msgb *msg, struct bsc_fd *bfd) { - u_int8_t msg_type = *(msg->l2h); + uint8_t msg_type = *(msg->l2h); int ret = 0; switch (msg_type) { @@ -247,8 +247,8 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg, struct bsc_fd *bfd) { struct tlv_parsed tlvp; - u_int8_t msg_type = *(msg->l2h); - u_int16_t site_id = 0, bts_id = 0, trx_id = 0; + uint8_t msg_type = *(msg->l2h); + uint16_t site_id = 0, bts_id = 0, trx_id = 0; struct gsm_bts *bts; char *unitid; int len, ret; @@ -260,7 +260,7 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg, case IPAC_MSGT_ID_RESP: DEBUGP(DMI, "ID_RESP "); /* parse tags, search for Unit ID */ - ret = ipaccess_idtag_parse(&tlvp, (u_int8_t *)msg->l2h + 2, + ret = ipaccess_idtag_parse(&tlvp, (uint8_t *)msg->l2h + 2, msgb_l2len(msg)-2); DEBUGP(DMI, "\n"); if (ret < 0) { @@ -596,7 +596,7 @@ static int handle_ts1_write(struct bsc_fd *bfd) struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; struct e1inp_sign_link *sign_link; struct msgb *msg; - u_int8_t proto; + uint8_t proto; int ret; bfd->when &= ~BSC_FD_WRITE; diff --git a/openbsc/src/libabis/input/misdn.c b/openbsc/src/libabis/input/misdn.c index e111c131e..59289906a 100644 --- a/openbsc/src/libabis/input/misdn.c +++ b/openbsc/src/libabis/input/misdn.c @@ -210,7 +210,7 @@ static int handle_ts1_write(struct bsc_fd *bfd) struct sockaddr_mISDN sa; struct msgb *msg; struct mISDNhead *hh; - u_int8_t *l2_data; + uint8_t *l2_data; int ret; bfd->when &= ~BSC_FD_WRITE; @@ -260,7 +260,7 @@ static int handle_tsX_write(struct bsc_fd *bfd) unsigned int ts_nr = bfd->priv_nr; struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; struct mISDNhead *hh; - u_int8_t tx_buf[BCHAN_TX_GRAN + sizeof(*hh)]; + uint8_t tx_buf[BCHAN_TX_GRAN + sizeof(*hh)]; struct subch_mux *mx = &e1i_ts->trau.mux; int ret; -- cgit v1.2.3